summaryrefslogtreecommitdiffstats
path: root/flags.py
diff options
context:
space:
mode:
Diffstat (limited to 'flags.py')
-rw-r--r--flags.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/flags.py b/flags.py
new file mode 100644
index 000000000..b2ef58f70
--- /dev/null
+++ b/flags.py
@@ -0,0 +1,25 @@
+# A lot of effort, but it only allows a limited set of flags to be referenced
+class Flags:
+
+ def __getattr__(self, attr):
+ if self.__dict__['flags'].has_key(attr):
+ return self.__dict__['flags'][attr]
+
+ raise AttributeError, attr
+
+ def __setattr__(self, attr, val):
+ if self.__dict__['flags'].has_key(attr):
+ self.__dict__['flags'][attr] = val
+ else:
+ raise AttributeError, attr
+
+ def __init__(self):
+ self.__dict__['flags'] = {}
+ self.__dict__['flags']['test'] = 0
+ self.__dict__['flags']['expert'] = 0
+ self.__dict__['flags']['serial'] = 0
+ self.__dict__['flags']['setupFilesystems'] = 1
+
+
+global flags
+flags = Flags()