Merge branch 'csllbr-master'

This commit is contained in:
Arun Prakash Jana 2016-09-05 07:38:45 +05:30
commit bebfc965cd

21
buku
View File

@ -1262,19 +1262,13 @@ def prompt(results, noninteractive=False, delete=False):
except EOFError:
return
# iterate over whitespace separated indices
for nav in (' '.join(nav.split())).split():
if is_int(nav):
index = int(nav) - 1
if index < 0 or index >= count:
logger.error('Index out of bound')
continue
try:
browser_open(unquote(results[index][1]))
except Exception as e:
_, _, linenumber, func, _, _ = inspect.stack()[0]
logger.error('%s(), ln %d: %s', func, linenumber, e)
elif nav == 'a':
for index in range(0,count):
try:
browser_open(unquote(results[index][1]))
except Exception as e:
@ -1289,15 +1283,16 @@ def prompt(results, noninteractive=False, delete=False):
except Exception as e:
_, _, linenumber, func, _, _ = inspect.stack()[0]
logger.error('%s(), ln %d: %s', func, linenumber, e)
elif ' ' in nav and is_int(nav.split(' ')[0]) and is_int(nav.split(' ')[1]):
for index in nav.strip().split(' '):
else:
break
else:
if nav == 'a':
for index in range(0, count):
try:
browser_open(unquote(results[int(index)-1][1]))
browser_open(unquote(results[index][1]))
except Exception as e:
_, _, linenumber, func, _, _ = inspect.stack()[0]
logger.error('%s(), ln %d: %s', func, linenumber, e)
else:
break
def print_record(row, count=0):