diff --git a/pymisp/api.py b/pymisp/api.py index 1b8b83a..5773850 100644 --- a/pymisp/api.py +++ b/pymisp/api.py @@ -384,6 +384,11 @@ class PyMISP(object): to_post = {'request': {}} authorized_categs = ['Payload delivery', 'Artifacts dropped', 'Payload Installation', 'External Analysis'] + if event_id is not None: + try: + event_id = int(event_id) + except: + pass if not isinstance(event_id, int): # New event to_post['request'] = self._create_event(distribution, threat_level_id, analysis, info) @@ -543,8 +548,6 @@ class PyMISP(object): details = [] for f in result['result']: decoded = base64.b64decode(f['base64']) - #if not isinstance(decoded, unicode): - # decoded = decoded.encode('utf-8') zipped = BytesIO(decoded) archive = zipfile.ZipFile(zipped) try: diff --git a/setup.py b/setup.py index 2baeaa1..e1c4396 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup setup( name='pymisp', - version='1.8.1', + version='1.8.2', author='Raphaël Vinot', author_email='raphael.vinot@circl.lu', maintainer='Raphaël Vinot',