Skip to content

Commit 7385253

Browse files
committed
using isinstance instead of type
1 parent 2a9e5fe commit 7385253

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_requests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def request(method, url, data=None, json=None, headers=None, stream=False, timeo
212212
data = json_module.dumps(json)
213213
sock.send(b"Content-Type: application/json\r\n")
214214
if data:
215-
if type(data) is dict:
215+
if isinstance(data, dict):
216216
sock.send(b"Content-Type: application/x-www-form-urlencoded\r\n")
217217
_post_data = ""
218218
for k in data:

0 commit comments

Comments
 (0)