summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Admin/Client.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Server/Admin/Client.py')
-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)