diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2009-10-07 14:46:08 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2009-10-07 14:46:08 +0000 |
commit | eac52c270b8b3b10e461bc46502b64c5f898bd7d (patch) | |
tree | 96da2e78af41305b445de23596b75bf754eedbbc /src/lib/Options.py | |
parent | e686d3b69600441e943c2913542e5477af528d87 (diff) | |
download | bcfg2-eac52c270b8b3b10e461bc46502b64c5f898bd7d.tar.gz bcfg2-eac52c270b8b3b10e461bc46502b64c5f898bd7d.tar.bz2 bcfg2-eac52c270b8b3b10e461bc46502b64c5f898bd7d.zip |
Pylint/PEP 8 Code cleanups
Signed-off-by: Sol Jerome <solj@ices.utexas.edu>
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5477 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Options.py')
-rw-r--r-- | src/lib/Options.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/Options.py b/src/lib/Options.py index b61fea808..1e4ce7aef 100644 --- a/src/lib/Options.py +++ b/src/lib/Options.py @@ -22,6 +22,7 @@ DEFAULT_INSTALL_PREFIX = '/usr' #/usr class Option(object): cfpath = DEFAULT_CONFIG_LOCATION __cfp = False + def getCFP(self): if not self.__cfp: self.__cfp = ConfigParser.ConfigParser() @@ -36,7 +37,7 @@ class Option(object): return self.cook(value) else: return value - + def __init__(self, desc, default, cmd=False, odesc=False, env=False, cf=False, cook=False, long_arg=False): self.desc = desc @@ -121,7 +122,7 @@ class OptionSet(dict): def __init__(self, *args): dict.__init__(self, *args) self.hm = self.buildHelpMessage() - + def buildGetopt(self): return ''.join([opt.buildGetopt() for opt in list(self.values())]) @@ -191,7 +192,7 @@ MDATA_PARANOID = Option('Default ConfigFile paranoid setting', SERVER_REPOSITORY = Option('Server repository path', '/var/lib/bcfg2', cf=('server', 'repository'), cmd='-Q', - odesc='<repository path>' ) + odesc='<repository path>') SERVER_PLUGINS = Option('Server plugin list', cf=('server', 'plugins'), # default server plugins default=[ @@ -299,7 +300,7 @@ LOGGING_FILE_PATH = Option('Set path of file log', default=None, cmd='-o', odesc='<path>', cf=('logging', 'path')) CLIENT_SERVICE_MODE = Option('Set client service mode', default='default', - cmd='-s', odesc='<default|disabled|build>') + cmd='-s', odesc='<default|disabled|build>') class OptionParser(OptionSet): |