Index should be >= 0 to browse

This commit is contained in:
Arun Prakash Jana 2017-04-26 18:42:15 +05:30
parent b55bb2e37a
commit a1e6df2edb
No known key found for this signature in database
GPG Key ID: A75979F35C080412

View File

@ -3212,7 +3212,10 @@ POSITIONAL ARGUMENTS:
try:
for idx in args.open:
if is_int(idx):
bdb.browse_by_index(int(idx))
if int(idx) >= 0:
bdb.browse_by_index(int(idx))
else:
raise ValueError
elif '-' in idx:
vals = [int(x) for x in idx.split('-')]
if vals[0] > vals[-1]: