summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-07-12 00:33:29 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-07-12 00:33:29 +0000
commit78d5ee44541d946208821646526857a400da005f (patch)
tree3fd339a9beb9eb8d548fe1bff06c3f784506299b /src/lib
parentd38bb5eb6be3a858abc82107b59b3cedc3da45c8 (diff)
downloadbcfg2-78d5ee44541d946208821646526857a400da005f.tar.gz
bcfg2-78d5ee44541d946208821646526857a400da005f.tar.bz2
bcfg2-78d5ee44541d946208821646526857a400da005f.zip
Add option and error handling
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4778 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Server/Admin/Reports.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/Server/Admin/Reports.py b/src/lib/Server/Admin/Reports.py
index cafc61e2d..22a3d3031 100644
--- a/src/lib/Server/Admin/Reports.py
+++ b/src/lib/Server/Admin/Reports.py
@@ -94,8 +94,13 @@ class Reports(Bcfg2.Server.Admin.Mode):
c_list = Client.objects.all()
result = list()
-
- opts, pargs = getopt(args, 'cd', ['sort=', 'fields='])
+
+ try:
+ opts, pargs = getopt(args, 'cdx:', ['sort=', 'fields='])
+ except:
+ print "error"
+ print self.__shorthelp__
+ raise SystemExit(1)
for option in opts:
if len(option) > 0: