summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-04-06 13:22:16 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-04-06 13:22:16 +0000
commitc80602d06c7d593f6311712ca6205f660ee04f86 (patch)
treeafb739d404f93d9d926125211404de35954e60b8 /src/sbin
parenta8d7ee4f323ece7f5dfd8452f6066cff53ee72b6 (diff)
downloadbcfg2-c80602d06c7d593f6311712ca6205f660ee04f86.tar.gz
bcfg2-c80602d06c7d593f6311712ca6205f660ee04f86.tar.bz2
bcfg2-c80602d06c7d593f6311712ca6205f660ee04f86.zip
Fix option handling (resolves issue reported by mbrady)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3020 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg24
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2
index 24ab67592..d9d4e9e73 100755
--- a/src/sbin/bcfg2
+++ b/src/sbin/bcfg2
@@ -80,11 +80,11 @@ class Client:
Bcfg2.Logging.setup_logging('bcfg2', to_syslog=False, level=level)
self.logger = logging.getLogger('bcfg2')
self.logger.debug(self.setup)
- if self.setup['drivers'] == 'help':
+ if 'drivers' in self.setup and self.setup['drivers'] == 'help':
self.logger.info("The following drivers are available:")
self.logger.info(Bcfg2.Client.Tools.drivers)
raise SystemExit, 0
- if 'services' in self.setup['remove']:
+ if self.setup['remove'] and 'services' in self.setup['remove']:
self.logger.error("Service removal is nonsensical, disable services to get former behavior")
if self.setup['remove'] not in [False, 'all', 'services', 'packages']:
self.logger.error("Got unknown argument %s for -r" % (self.setup['remove']))