round hands/sec and show some traceback info in exception handler (v useful)
This commit is contained in:
parent
c2f79ddc24
commit
36de79140c
|
@ -21,6 +21,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
from time import time
|
from time import time
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
import traceback
|
||||||
|
|
||||||
# pyGTK modules
|
# pyGTK modules
|
||||||
import pygtk
|
import pygtk
|
||||||
|
@ -81,14 +82,14 @@ class GuiBulkImport():
|
||||||
ttime = time() - starttime
|
ttime = time() - starttime
|
||||||
if ttime == 0:
|
if ttime == 0:
|
||||||
ttime = 1
|
ttime = 1
|
||||||
print 'GuiBulkImport.load done: Stored: %d \tDuplicates: %d \tPartial: %d \tErrors: %d in %s seconds - %d/sec'\
|
print 'GuiBulkImport.load done: Stored: %d \tDuplicates: %d \tPartial: %d \tErrors: %d in %s seconds - %.0f/sec'\
|
||||||
% (stored, dups, partial, errs, ttime, stored / ttime)
|
% (stored, dups, partial, errs, ttime, (stored+0.0) / ttime)
|
||||||
self.importer.clearFileList()
|
self.importer.clearFileList()
|
||||||
|
|
||||||
self.lab_info.set_text("Import finished")
|
self.lab_info.set_text("Import finished")
|
||||||
except:
|
except:
|
||||||
print "bulkimport.loadclicked error: "+str(sys.exc_value)
|
err = traceback.extract_tb(sys.exc_info()[2])[-1]
|
||||||
pass
|
print "***Error: "+err[2]+"("+str(err[1])+"): "+str(sys.exc_info()[1])
|
||||||
self.settings['global_lock'].release()
|
self.settings['global_lock'].release()
|
||||||
else:
|
else:
|
||||||
print "bulk-import aborted - global lock not available"
|
print "bulk-import aborted - global lock not available"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user