mirror of https://github.com/MISP/PyMISP
chg: Code cleanup
parent
e993886dd7
commit
5286462361
|
@ -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)"""
|
||||||
|
|
Loading…
Reference in New Issue