Merge pull request #52 from KennethAdamMiller/master

Caught exception on python3.4 where base64encode returns bytes
pull/24/head
Raphaël Vinot 2016-07-27 17:37:53 +02:00 committed by GitHub
commit fe20c4f5ac
1 changed files with 1 additions and 1 deletions

View File

@ -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):