diff options
author | Chris Lumens <clumens@redhat.com> | 2009-03-05 09:40:34 -0500 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2009-03-05 09:58:07 -0500 |
commit | 9f30febc2df2ebfc64e54470a3d7a9cbdbb3d8d6 (patch) | |
tree | 104ac26c0af900b7e3063c5a007998f601aaa4a3 | |
parent | bb6b3a050d0a007cea27bdd716280c19bb104071 (diff) | |
download | anaconda-9f30febc2df2ebfc64e54470a3d7a9cbdbb3d8d6.tar.gz anaconda-9f30febc2df2ebfc64e54470a3d7a9cbdbb3d8d6.tar.xz anaconda-9f30febc2df2ebfc64e54470a3d7a9cbdbb3d8d6.zip |
Add a get() method to Flags, since it pretends to be a dictionary.
-rw-r--r-- | flags.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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() |