summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-09-18 13:20:49 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-09-18 13:20:49 +0000
commitc8391e7e22c9af905aeced140d95de6f4f030227 (patch)
treee351305c2c1be5f6b2d9e7dbeeb958f3357c9e1c
parentdf02435a1cd0662788135919b303a4cffb9a7d21 (diff)
downloadbcfg2-c8391e7e22c9af905aeced140d95de6f4f030227.tar.gz
bcfg2-c8391e7e22c9af905aeced140d95de6f4f030227.tar.bz2
bcfg2-c8391e7e22c9af905aeced140d95de6f4f030227.zip
improve argument error handling
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4914 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Admin/Query.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/Server/Admin/Query.py b/src/lib/Server/Admin/Query.py
index 759e542b6..76f15948b 100644
--- a/src/lib/Server/Admin/Query.py
+++ b/src/lib/Server/Admin/Query.py
@@ -54,6 +54,9 @@ class Query(Bcfg2.Server.Admin.Mode):
nc = self.meta.GetClientByProfile(v)
elif k == 'g':
nc = self.meta.GetClientByGroup(v)
+ else:
+ print "One of g= or p= must be specified"
+ raise SystemExit(1)
clients = [c for c in clients if c in nc]
if '-n' in args:
for client in clients: