mirror of https://github.com/MISP/PyMISP
Caught exception on python3.4 where base64encode returns bytes and not str, and bytes are not json encodable. This caused a failure in upload_sample
parent
7c6b095a05
commit
90b772d938
|
@ -677,7 +677,7 @@ class PyMISP(object):
|
|||
|
||||
def _encode_file_to_upload(self, path):
|
||||
with open(path, 'rb') as f:
|
||||
return base64.b64encode(f.read())
|
||||
return str(base64.b64encode(f.read()))
|
||||
|
||||
def upload_sample(self, filename, filepath, event_id, distribution, to_ids,
|
||||
category, comment, info, analysis, threat_level_id):
|
||||
|
|
Loading…
Reference in New Issue