Remove support of Python2.5 and fix py3 warnings

This commit is contained in:
Cédric Krier committed 2011-07-12 00:17:26 +02:00
1 parent 66aa44160b
commit d2ac821e59
2 files changed
+2 -3

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
from __future__ import with_statement
from decimal import Decimal
import base64
import operator
from trytond.model import ModelWorkflow, ModelView, ModelSQL, fields
from trytond.report import Report
from trytond.wizard import Wizard
@@ -485,7 +485,7 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView):
if line.account.id == invoice.account.id \
and line.maturity_date:
lines.append(line)
lines.sort(lambda x, y: cmp(x.maturity_date, y.maturity_date))
lines.sort(key=operator.attrgetter('maturity_date'))
res[invoice.id] = [x.id for x in lines]
return res
-1
View File
@@ -51,7 +51,6 @@ setup(name='trytond_account_invoice',
'Natural Language :: German',
'Natural Language :: Spanish',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Office/Business',