mirror of https://github.com/MISP/PyMISP
Formatted "Unknown MISP object" error message
When a user tries to add an object with a name that doesn't exist, the error thrown was missing its format string This ended up looking like pymisp.exceptions.UnknownMISPObjectTemplate: {} is unknown in the MISP object directory. Here's a patch that adds self.name to the format stringpull/112/head
parent
7e797e5f6f
commit
f08f744cc2
|
@ -604,7 +604,7 @@ class MISPObject(AbstractMISP):
|
||||||
self.__known_template = True
|
self.__known_template = True
|
||||||
else:
|
else:
|
||||||
if self.__strict:
|
if self.__strict:
|
||||||
raise UnknownMISPObjectTemplate('{} is unknown in the MISP object directory.')
|
raise UnknownMISPObjectTemplate('{} is unknown in the MISP object directory.'.format(self.name))
|
||||||
else:
|
else:
|
||||||
self.__known_template = False
|
self.__known_template = False
|
||||||
if self.__known_template:
|
if self.__known_template:
|
||||||
|
|
Loading…
Reference in New Issue