fixed a number of shell-related failures.

This commit is contained in:
percious17
2008-12-02 19:58:25 +00:00
parent b2cca18c36
commit 06b678bfef
2 changed files with 8 additions and 4 deletions

View File

@@ -91,8 +91,11 @@ def parse_args(*args,**kwargs):
cmdname = args.pop(0)
if cmdname == 'downgrade':
if not args[-1].startswith('--'):
kwargs['version'] = args[-1]
args = args[:-1]
try:
kwargs['version'] = str(int(args[-1]))
args = args[:-1]
except:
pass
except IndexError:
# No command specified: no error message; just show usage