From d8918ee23116b992db0f5aaf0275b5fd3c5c32f8 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Thu, 5 Nov 2009 12:47:24 +0000 Subject: 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 --- src/lib/Server/Admin/Snapshots.py | 3 +++ 1 file changed, 3 insertions(+) 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 ") + return client = args[2] snap = Snapshot.get_current(self.session, unicode(client)) if not snap: -- cgit v1.2.3-1-g7c22