mirror of https://github.com/MISP/PyMISP
Improve errors flattening
parent
cd7f928382
commit
c91849b468
|
@ -185,6 +185,7 @@ class PyMISP(object):
|
|||
else:
|
||||
messages.append('Error in {}: {}'.format(where, msg))
|
||||
else:
|
||||
if isinstance(errors, list):
|
||||
for e in errors:
|
||||
if not e:
|
||||
continue
|
||||
|
@ -194,6 +195,9 @@ class PyMISP(object):
|
|||
for type_e, msgs in e.items():
|
||||
for m in msgs:
|
||||
messages.append('Error in {}: {}'.format(where, m))
|
||||
else:
|
||||
messages.append('{} ({})'.format(errors, where))
|
||||
|
||||
return messages
|
||||
|
||||
def _check_response(self, response):
|
||||
|
|
Loading…
Reference in New Issue