Working on providing good error feedback

svn: r18336
This commit is contained in:
Doug Blank
2011-10-16 17:30:51 +00:00
parent ae5e389bd7
commit d853e2886d
2 changed files with 23 additions and 12 deletions

View File

@ -35,7 +35,9 @@ def import_file(db, filename, callback):
if format == pdata.extension:
mod = pmgr.load_plugin(pdata)
if not mod:
for name, error_tuple in pmgr.get_fail_list():
for item in pmgr.get_fail_list():
name, error_tuple, pdata = item
# (filename, (exception-type, exception, traceback), pdata)
etype, exception, traceback = error_tuple
print "ERROR:", name, exception
return False
@ -89,7 +91,8 @@ def export_file(db, filename, callback):
if format == pdata.extension:
mod = pmgr.load_plugin(pdata)
if not mod:
for name, error_tuple in pmgr.get_fail_list():
for item in pmgr.get_fail_list():
name, error_tuple, pdata = item
etype, exception, traceback = error_tuple
print "ERROR:", name, exception
return False