Mercurial > libervia-backend
changeset 3604:80815f2f12cf
frontends (tools/misc): `FlagsHandler.__getitems__` now returns attribute
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 29 Jul 2021 22:51:01 +0200 |
parents | 25cbaf047728 |
children | 62e81b1058f8 |
files | sat_frontends/tools/misc.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/sat_frontends/tools/misc.py Thu Jul 29 22:51:01 2021 +0200 +++ b/sat_frontends/tools/misc.py Thu Jul 29 22:51:01 2021 +0200 @@ -76,6 +76,9 @@ 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)