chg: Code cleanup

pull/434/head
Raphaël Vinot 2019-08-06 14:23:32 +02:00
parent e993886dd7
commit 5286462361
1 changed files with 1 additions and 4 deletions

View File

@ -46,13 +46,11 @@ try:
from dateutil.parser import parse from dateutil.parser import parse
except ImportError: except ImportError:
logger.exception("Cannot import dateutil") logger.exception("Cannot import dateutil")
pass
try: try:
import jsonschema import jsonschema
except ImportError: except ImportError:
logger.exception("Cannot import jsonschema") logger.exception("Cannot import jsonschema")
pass
try: try:
# pyme renamed to gpg the 2016-10-28 # pyme renamed to gpg the 2016-10-28
@ -680,8 +678,7 @@ class MISPEvent(AbstractMISP):
self.edited = True self.edited = True
if attr_list: if attr_list:
return attr_list return attr_list
else: return attribute
return attribute
def get_object_by_id(self, object_id): def get_object_by_id(self, object_id):
"""Get an object by ID (the ID is the one set by the server when creating the new object)""" """Get an object by ID (the ID is the one set by the server when creating the new object)"""