Return None for missing trust_id in fixture
If the trust_id is unset it raises a KeyError. This is unusual from a python perspective (if nothing else it should be AttributeError) and different to all the other attributes of the fixture. Return None if no trust_id is set on the fixture. Change-Id: I15d33d77027a188fa47df18387c4610908f8e2d2
This commit is contained in:
parent
c6d33c441b
commit
2a4095eef0
|
@ -166,7 +166,7 @@ class Token(dict):
|
|||
|
||||
@property
|
||||
def trust_id(self):
|
||||
return self.root.setdefault('trust', {})['id']
|
||||
return self.root.setdefault('trust', {}).get('id')
|
||||
|
||||
@trust_id.setter
|
||||
def trust_id(self, value):
|
||||
|
|
Loading…
Reference in New Issue