summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorAndrew Brestick <brestick@mcs.anl.gov>2008-06-27 14:18:00 +0000
committerAndrew Brestick <brestick@mcs.anl.gov>2008-06-27 14:18:00 +0000
commit70e36603fae55888a30e2d5b9176e4b13d987ae3 (patch)
treee45b8d0dcde2000aaff2610ace0f8bd449ce7666 /src/lib
parentc5ad72e5b19bd3a301246e0b5147b697c96e63a0 (diff)
downloadbcfg2-70e36603fae55888a30e2d5b9176e4b13d987ae3.tar.gz
bcfg2-70e36603fae55888a30e2d5b9176e4b13d987ae3.tar.bz2
bcfg2-70e36603fae55888a30e2d5b9176e4b13d987ae3.zip
updated client admin mode and bcfg2-admin man pages with thenostradamus' patches
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4724 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Server/Admin/Client.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/Server/Admin/Client.py b/src/lib/Server/Admin/Client.py
index 618e5b826..1cecc0e71 100644
--- a/src/lib/Server/Admin/Client.py
+++ b/src/lib/Server/Admin/Client.py
@@ -20,7 +20,13 @@ class Client(Bcfg2.Server.Admin.Mode):
def __call__(self, args):
Bcfg2.Server.Admin.Mode.__call__(self, args)
- if args[0] == 'add':
+ if len(args) == 0:
+ self.errExit("Client mode requires at least one argument: <add> or <delete>")
+ if "-h" in args:
+ print "Usage: "
+ print self.__shorthelp__
+ raise SystemExit(1)
+ if args[0] == 'add':
attr_d = {}
for i in args[2:]:
attr, val = i.split('=', 1)