frontends (tools/misc): FlagsHandler.__getitems__ now returns attribute
This commit is contained in:
parent
60fe49f883
commit
0caebd3803
1 changed files with 3 additions and 0 deletions
|
|
@ -76,6 +76,9 @@ class FlagsHandler(object):
|
|||
self._used_flags.add(flag)
|
||||
return flag in self.flags
|
||||
|
||||
def __getitem__(self, flag):
|
||||
return getattr(self, flag)
|
||||
|
||||
def __len__(self):
|
||||
return len(self.flags)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue