1import os 2import platform 3 4class Options: 5 _options = { 6 'architecture': platform.architecture()[0], 7 'is_privileged': os.geteuid() == 0, 8 'skip_alerts': [], 9 'skip_sanitizer': False, 10 'system': platform.system() 11 } 12 13 def __setattr__(self, name, value): 14 Options._options[name] = value 15 16 def __getattr__(self, name): 17 if name in Options._options: 18 return Options._options[name] 19 20 raise AttributeError 21 22 23option = Options() 24