chg: Type in the warning list is now enforced
parent
a608dd5c13
commit
10f706cfcb
|
@ -38,7 +38,6 @@ class WarningList():
|
|||
self.description = self.warninglist['description']
|
||||
self.version = int(self.warninglist['version'])
|
||||
self.name = self.warninglist['name']
|
||||
if self.warninglist.get('type'):
|
||||
self.type = self.warninglist['type']
|
||||
if self.warninglist.get('matching_attributes'):
|
||||
self.matching_attributes = self.warninglist['matching_attributes']
|
||||
|
@ -59,9 +58,8 @@ class WarningList():
|
|||
|
||||
def to_dict(self):
|
||||
to_return = {'list': [str(e) for e in self.list], 'name': self.name,
|
||||
'description': self.description, 'version': self.version}
|
||||
if hasattr(self, 'type'):
|
||||
to_return['type'] = self.type
|
||||
'description': self.description, 'version': self.version,
|
||||
'type': self.type}
|
||||
if hasattr(self, 'matching_attributes'):
|
||||
to_return['matching_attributes'] = self.matching_attributes
|
||||
return to_return
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 0f23d9cb18485d190cd495ee02d9bfe872674561
|
||||
Subproject commit 260da4af14b434b4eb5b697c9e3b9860878e6550
|
Loading…
Reference in New Issue