summaryrefslogtreecommitdiffstats
path: root/flags.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-03-05 09:40:34 -0500
committerChris Lumens <clumens@redhat.com>2009-03-05 09:58:07 -0500
commit9f30febc2df2ebfc64e54470a3d7a9cbdbb3d8d6 (patch)
tree104ac26c0af900b7e3063c5a007998f601aaa4a3 /flags.py
parentbb6b3a050d0a007cea27bdd716280c19bb104071 (diff)
downloadanaconda-9f30febc2df2ebfc64e54470a3d7a9cbdbb3d8d6.tar.gz
anaconda-9f30febc2df2ebfc64e54470a3d7a9cbdbb3d8d6.tar.xz
anaconda-9f30febc2df2ebfc64e54470a3d7a9cbdbb3d8d6.zip
Add a get() method to Flags, since it pretends to be a dictionary.
Diffstat (limited to 'flags.py')
-rw-r--r--flags.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/flags.py b/flags.py
index 2d77bd794..8dbcc9f9d 100644
--- a/flags.py
+++ b/flags.py
@@ -36,6 +36,12 @@ class Flags:
else:
raise AttributeError, attr
+ def get(self, attr, val=None):
+ if self.__dict__['flags'].has_key(attr):
+ return self.__dict__['flags'][attr]
+ else:
+ return val
+
def createCmdlineDict(self):
cmdlineDict = {}
cmdline = open("/proc/cmdline", "r").read().strip()