2620: GEPS 031: Python 3 support - 3.2

round 2 for python 3 support:
* no more cmp, also not in sort and sorted
* bsddb needs bytestring keys
* gtk does not need utf-8 encoded anymore...


svn: r20658
This commit is contained in:
Benny Malengier
2012-11-15 08:08:31 +00:00
parent b9aafe5b49
commit 8b39b80dc8
45 changed files with 596 additions and 419 deletions

View File

@@ -157,7 +157,7 @@ def create_quickreport_menu(category,dbstate,uistate, handle) :
#add tuple function, translated name, name, status
showlst.append(pdata)
showlst.sort(by_menu_name)
showlst.sort(key=lambda x: x.name)
for pdata in showlst:
new_key = pdata.id.replace(' ', '-')
ofile.write('<menuitem action="%s"/>' % new_key)
@@ -168,9 +168,6 @@ def create_quickreport_menu(category,dbstate,uistate, handle) :
return (ofile.getvalue(), actions)
def by_menu_name(first, second):
return cmp(first.name, second.name)
def make_quick_report_callback(pdata, category, dbstate, uistate, handle):
return lambda x: run_report(dbstate, uistate, category, handle, pdata)