summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Admin/Snapshots.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-11-05 12:47:24 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-11-05 12:47:24 +0000
commitd8918ee23116b992db0f5aaf0275b5fd3c5c32f8 (patch)
tree518d27888cc31b59730dad7626caaa661e0d1d2a /src/lib/Server/Admin/Snapshots.py
parent0b5cefd2eb5d48628d7a8da1e592cc9b8dc778a4 (diff)
downloadbcfg2-d8918ee23116b992db0f5aaf0275b5fd3c5c32f8.tar.gz
bcfg2-d8918ee23116b992db0f5aaf0275b5fd3c5c32f8.tar.bz2
bcfg2-d8918ee23116b992db0f5aaf0275b5fd3c5c32f8.zip
Snapshots: handle client traceback when called with bad options
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5542 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Admin/Snapshots.py')
-rw-r--r--src/lib/Server/Admin/Snapshots.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/Server/Admin/Snapshots.py b/src/lib/Server/Admin/Snapshots.py
index c7ea3a376..a68dec30d 100644
--- a/src/lib/Server/Admin/Snapshots.py
+++ b/src/lib/Server/Admin/Snapshots.py
@@ -99,6 +99,9 @@ class Snapshots(Bcfg2.Server.Admin.Mode):
padding=1)
elif '-b' in args[1:]:
# Query a single host for bad entries
+ if len(args) < 3:
+ print("Usage: bcfg2-admin snapshots -b <client>")
+ return
client = args[2]
snap = Snapshot.get_current(self.session, unicode(client))
if not snap: