# HG changeset patch # User Atul Varma # Date 1228775592 28800 # Node ID ce037f485614ccf385845418b1ce8ca47287c9c4 # Parent 702b55be90305d1c0e316642b2ed03072e6d7556 Fixes diff -r 702b55be9030 -r ce037f485614 kharon.py --- a/kharon.py Mon Dec 08 14:32:06 2008 -0800 +++ b/kharon.py Mon Dec 08 14:33:12 2008 -0800 @@ -50,10 +50,6 @@ help='undo a transaction (default is latest).') (options, args) = parser.parse_args() - if not args: - parser.print_help() - sys.exit(-1) - config = Config(STATE_FILENAME) if options.undo: @@ -73,13 +69,17 @@ print('Transaction %d does not exist.' % transid) sys.exit(-1) - print('Sorry, undo is not implemented yet.' + print('Sorry, undo is not implemented yet. ' 'But you can find what you need in the following ' 'directory/directories:\n') print('\n'.join([dir_for_trans(transid) for transid in transactions])) sys.exit(-1) else: + if not args: + parser.print_help() + sys.exit(-1) + files = [] for arg in args: filename = os.path.abspath(os.path.expanduser(arg))