diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-04-27 21:07:42 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-04-27 21:07:42 +0000 |
commit | e6ce3facc910176824b629314d5b5b405d57b9b1 (patch) | |
tree | c03db122ed9c65e9aee38e976d199b96fc3be7c7 /src/sbin | |
parent | d2002bbd09771560f8db380345c9c55c3abc1d38 (diff) | |
download | bcfg2-e6ce3facc910176824b629314d5b5b405d57b9b1.tar.gz bcfg2-e6ce3facc910176824b629314d5b5b405d57b9b1.tar.bz2 bcfg2-e6ce3facc910176824b629314d5b5b405d57b9b1.zip |
* Fix auto-marshalling of binary cfg files
* Fix argument parsing duplication (resolves ticket #50)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1857 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin')
-rwxr-xr-x | src/sbin/bcfg2 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2 index 410114280..370b14c7d 100755 --- a/src/sbin/bcfg2 +++ b/src/sbin/bcfg2 @@ -21,13 +21,6 @@ def cb_sigint_handler(signum, frame): class Client: ''' The main bcfg2 client class ''' def __init__(self): - level = 30 - if '-v' in sys.argv: - level = 20 - if '-d' in sys.argv: - level = 0 - Bcfg2.Logging.setup_logging('bcfg2', to_syslog=False, level=level) - self.logger = logging.getLogger('bcfg2') self.toolset = None self.config = None @@ -71,6 +64,13 @@ class Client: } self.setup = Bcfg2.Options.OptionParser('bcfg2', optinfo).parse() + level = 30 + if self.setup['verbose']: + level = 20 + if self.setup['debug']: + level = 0 + Bcfg2.Logging.setup_logging('bcfg2', to_syslog=False, level=level) + self.logger = logging.getLogger('bcfg2') self.logger.debug(self.setup) if self.setup['remove'] not in [False, 'all', 'services', 'packages']: self.logger.error("Got unknown argument %s for -r" % (self.setup['remove'])) |