Ctrl+C added to union dump

This commit is contained in:
Miroslav Stampar 2011-01-06 09:48:04 +00:00
parent 0616edcc44
commit c968b438f2

View File

@ -172,6 +172,7 @@ def unionUse(expression, direct=False, unescape=True, resetCounter=False, nullCh
return
try:
for num in xrange(startLimit, stopLimit):
if kb.dbms in (DBMS.MSSQL, DBMS.SYBASE):
field = expressionFieldsList[0]
@ -196,7 +197,14 @@ def unionUse(expression, direct=False, unescape=True, resetCounter=False, nullCh
status = '%d/%d entries (%d%s)' % (count, length, round(100.0*count/length), '%')
dataToStdout("\r[%s] [INFO] retrieved: %s" % (time.strftime("%X"), status), True)
except KeyboardInterrupt:
print
warnMsg = "Ctrl+C detected in dumping phase"
logger.warn(warnMsg)
finally:
clearConsoleLine(True)
return value
value = unionUse(expression, direct=True, unescape=False)