mirror of https://github.com/MISP/PyMISP
Merge branch 'master' of github.com:MISP/PyMISP
commit
d260dc5ea5
|
@ -31,6 +31,6 @@ if __name__ == '__main__':
|
||||||
attribute = temp
|
attribute = temp
|
||||||
break
|
break
|
||||||
|
|
||||||
misp.add_tag(attribute, args.tag, True)
|
misp.add_tag(attribute, args.tag, attribute=True)
|
||||||
else:
|
else:
|
||||||
misp.add_tag(event['Event'], args.tag)
|
misp.add_tag(event['Event'], args.tag)
|
||||||
|
|
|
@ -174,7 +174,7 @@ class PyMISP(object):
|
||||||
for e in errors:
|
for e in errors:
|
||||||
if not e:
|
if not e:
|
||||||
continue
|
continue
|
||||||
if isinstance(e, str):
|
if isinstance(e, basestring):
|
||||||
messages.append(e)
|
messages.append(e)
|
||||||
continue
|
continue
|
||||||
for type_e, msgs in e.items():
|
for type_e, msgs in e.items():
|
||||||
|
@ -467,7 +467,7 @@ class PyMISP(object):
|
||||||
# It's a file handle - we can read it
|
# It's a file handle - we can read it
|
||||||
fileData = attachment.read()
|
fileData = attachment.read()
|
||||||
|
|
||||||
elif isinstance(attachment, str):
|
elif isinstance(attachment, basestring):
|
||||||
# It can either be the b64 encoded data or a file path
|
# It can either be the b64 encoded data or a file path
|
||||||
if os.path.exists(attachment):
|
if os.path.exists(attachment):
|
||||||
# It's a path!
|
# It's a path!
|
||||||
|
|
Loading…
Reference in New Issue