From: Xavier Morel Date: Fri, 14 Dec 2012 12:16:04 +0000 (+0100) Subject: [IMP] simplify to chained comparison X-Git-Tag: 7.0-server~364^2~22 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=576571bae26e7d13caf382d13370607f9042e7be;p=odoo%2Fodoo.git [IMP] simplify to chained comparison bzr revid: xmo@openerp.com-20121214121604-anypg1nudbk0bh9y --- diff --git a/openerp/report/pyPdf/filters.py b/openerp/report/pyPdf/filters.py index 7fe10fb..ebdacd0 100644 --- a/openerp/report/pyPdf/filters.py +++ b/openerp/report/pyPdf/filters.py @@ -106,7 +106,7 @@ class FlateDecode(object): if predictor != 1: columns = decodeParms["/Columns"] # PNG prediction: - if predictor >= 10 and predictor <= 15: + if 10 <= predictor <= 15: output = StringIO() # PNG prediction can vary from row to row rowlength = columns + 1 @@ -191,7 +191,7 @@ class ASCII85Decode(object): break else: c = ord(c) - 33 - assert c >= 0 and c < 85 + assert 0 <= c < 85 group += [ c ] if len(group) >= 5: b = group[0] * (85**4) + \