6484: IndexError for sort_data/column on quick view table

svn: r21762
This commit is contained in:
Benny Malengier 2013-03-27 14:22:20 +00:00
parent ba5a42eb3f
commit aac3f0d2e3
2 changed files with 7 additions and 3 deletions

View File

@ -408,8 +408,12 @@ class QuickTable(SimpleTable):
col += 1
try:
model.append(row=([count] + list(rowdata) + [col[count] for col in sort_data]))
except:
print("error in row %d: data: %s, sort data: %d" % (count, rowdata, len(sort_data[0])))
except KeyError as msg:
print (msg)
if sort_data:
print("Quicktable: error in row %d: data: %s, sort data: %d" % (count, rowdata, len(sort_data[0])))
else:
print("Quicktable: error in row %d: data: %s" % (count, rowdata))
count += 1
text_view.show_all()
self.simpledoc.paragraph("")

View File

@ -376,7 +376,7 @@ def run(database, document, filter_name, *args, **kwargs):
fullname = media_path_full(database, photo.get_path())
try:
bytes = posixpath.getsize(fullname)
stab.row(fullname, bytes)
stab.row(fullname, str(bytes))
matches += 1
except:
pass