summaryrefslogtreecommitdiffstats
path: root/flags.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-06-20 04:39:53 +0000
committerMatt Wilson <msw@redhat.com>2001-06-20 04:39:53 +0000
commitc4249bbe06e028e95f6514adb7f90ae11ab3b43b (patch)
tree408350beb14885893b86938d27a46688c4986003 /flags.py
parent8a566ec58b79dc8c583a4610a27a5182b31bacb8 (diff)
downloadanaconda-c4249bbe06e028e95f6514adb7f90ae11ab3b43b.tar.gz
anaconda-c4249bbe06e028e95f6514adb7f90ae11ab3b43b.tar.xz
anaconda-c4249bbe06e028e95f6514adb7f90ae11ab3b43b.zip
merge dispatch to HEAD
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()