summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-01-08 01:30:12 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-01-08 01:30:12 +0000
commita94af81bce14b39bde5f1e73f31a79756fc2b5bd (patch)
tree7eb75b7b1ca7521ba24d3acb1cdac2b6e289f12f
parentf2643329b73333da4037bd1f0e7186793c7195e6 (diff)
downloadbcfg2-a94af81bce14b39bde5f1e73f31a79756fc2b5bd.tar.gz
bcfg2-a94af81bce14b39bde5f1e73f31a79756fc2b5bd.tar.bz2
bcfg2-a94af81bce14b39bde5f1e73f31a79756fc2b5bd.zip
ensure bcfg2 isnt passed arguments (only options)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4197 ce84e21b-d406-0410-9b95-82705330c041
-rwxr-xr-xsrc/sbin/bcfg25
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2
index ef7bc59ad..4dec93d43 100755
--- a/src/sbin/bcfg2
+++ b/src/sbin/bcfg2
@@ -72,7 +72,10 @@ class Client:
self.setup = Bcfg2.Options.OptionParser(optinfo)
self.setup.parse(sys.argv[1:])
- print self.setup
+ if self.setup['args']:
+ print "Bcfg2 takes no arguments, only options"
+ print self.setup.buildHelpMessage()
+ raise SystemExit(1)
level = 30
if self.setup['verbose']:
level = 20