[issue869] grml-paste: traceback if calling "grml-paste help" without any action
Christian Hofstaedtler
bts at bts.grml.org
Mon Oct 11 13:23:08 CEST 2010
Christian Hofstaedtler <ch+grmlbts at zeha.at> added the comment:
Have a hack-ish "fix".
----------
assignedto: gebi
files: 0001-handle-help-with-no-args.patch
messages: 3224, 3370
nosy: ch, gebi, mika
priority: bug
status: chatting
title: grml-paste: traceback if calling "grml-paste help" without any action
_____________________________________
GRML issue tracker <bts at bts.grml.org>
<http://bts.grml.org/grml/issue869>
_____________________________________
-------------- next part --------------
>From f03dd8da84bd66fedf097c66b31a2771a850e756 Mon Sep 17 00:00:00 2001
From: Christian Hofstaedtler <ch+git at zeha.at>
Date: Mon, 11 Oct 2010 13:21:07 +0200
Subject: [PATCH] handle 'help' with no args
this is the simplest fix. everything else needs a large refactoring.
---
grml-paste | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/grml-paste b/grml-paste
index cba6108..e66586d 100755
--- a/grml-paste
+++ b/grml-paste
@@ -139,7 +139,7 @@ if __name__ == "__main__":
parser.add_option('-v', '--verbose', action='count', default=0, help='More output')
(opts, args) = parser.parse_args()
- if len(args) == 0:
+ if len(args) == 0 or (len(args) == 1 and args[0] == 'help'):
parser.error('Please provide me with an action')
elif args[0] in actions:
cmd = args.pop(0)
--
1.7.1
More information about the Bugs-changes
mailing list