Python3 fix: str instead of basestring
This commit is contained in:
parent
5e76e88397
commit
b81fe339a3
1 changed files with 1 additions and 3 deletions
|
@ -1,6 +1,4 @@
|
|||
#
|
||||
# cco.webapi.client
|
||||
#
|
||||
|
||||
"""
|
||||
Functions for providieng external services with object data
|
||||
|
@ -21,7 +19,7 @@ def sendJson(url, payload, cred, method):
|
|||
if url.startswith('test:'):
|
||||
resp = testing.request(method, url, json=payload, auth=cred)
|
||||
else:
|
||||
if isinstance(payload, basestring):
|
||||
if isinstance(payload, str):
|
||||
resp = requests.request(
|
||||
method, url, data=payload, auth=cred, timeout=10)
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue