Skip to content

Commit

Permalink
[SystemInfo] add __contains__ method
Browse files Browse the repository at this point in the history
Required for: if "xxx" in SystemInfo:
  • Loading branch information
Huevos committed Nov 24, 2024
1 parent 0cbb72c commit 69012b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/python/Components/SystemInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ def get(self, item, default=None):
def __prohibited(self, *args, **kws):
print("[SystemInfo] operation not permitted")

def __contains__(self, item):
return item in BoxInfo.boxInfo

clear = __prohibited
update = __prohibited
setdefault = __prohibited
Expand Down

0 comments on commit 69012b4

Please sign in to comment.