Mercurial > hrm
changeset 5:ce037f485614
Fixes
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Mon, 08 Dec 2008 14:33:12 -0800 |
parents | 702b55be9030 |
children | 9bffe9d72eac |
files | kharon.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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))