D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
imunify360
/
venv
/
lib64
/
python3.11
/
site-packages
/
defence360agent
/
internals
/
Filename :
global_scope.py
back
Copy
import logging logger = logging.getLogger(__name__) class GlobalScope(dict): def __getattr__(self, item): try: return self[item] except KeyError as err: raise AttributeError(f"{item} is not in global scope") from err def __setattr__(self, key, value): if key in self: logger.warning("Name %s is already in global scope", key) else: self[key] = value g = GlobalScope()