Fix python3 support.

pull/41/head v2.4.62
Raphaël Vinot 2017-01-25 17:16:37 +01:00
parent a81f6b5c15
commit 9ddbf0523d
1 changed files with 2 additions and 2 deletions

View File

@ -174,7 +174,7 @@ class PyMISP(object):
for e in errors:
if not e:
continue
if isinstance(e, str):
if isinstance(e, basestring):
messages.append(e)
continue
for type_e, msgs in e.items():
@ -464,7 +464,7 @@ class PyMISP(object):
# It's a file handle - we can read it
fileData = attachment.read()
elif isinstance(attachment, str):
elif isinstance(attachment, basestring):
# It can either be the b64 encoded data or a file path
if os.path.exists(attachment):
# It's a path!