summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNumerigraphe - Lionel Sausin <ls@numerigraphe.fr>2010-07-22 15:54:36 +0200
committerNumerigraphe - Lionel Sausin <ls@numerigraphe.fr>2010-07-22 15:54:36 +0200
commit666c4ec067ca4ecb1bf7dbb6c4cdd5ff3a58032a (patch)
tree941f44ff8af66438eac5f0701b215c333a2fa20f /bin
parent70fd90d33b2ebb25519d89b3505f616d2b6f7fa1 (diff)
[FIX] mutable default in tools
lp bug: https://launchpad.net/bugs/525808 fixed bzr revid: ls@numerigraphe.fr-20100722135436-grgj7vow495q65vf
Diffstat (limited to 'bin')
-rw-r--r--bin/tools/convert.py2
-rw-r--r--bin/tools/copy.py4
-rw-r--r--bin/tools/pdf_utils.py2
3 files changed, 5 insertions, 3 deletions
diff --git a/bin/tools/convert.py b/bin/tools/convert.py
index 973e762cd2e..20f54e15f11 100644
--- a/bin/tools/convert.py
+++ b/bin/tools/convert.py
@@ -598,7 +598,7 @@ form: module.record_id""" % (xml_id,)
self.pool.get('ir.model.data').ir_set(cr, self.uid, 'action', 'tree_but_open', 'Menuitem', [('ir.ui.menu', int(pid))], action, True, True, xml_id=rec_id)
return ('ir.ui.menu', pid)
- def _assert_equals(self, f1, f2, prec = 4):
+ def _assert_equals(self, f1, f2, prec=4):
return not round(f1 - f2, prec)
def _tag_assert(self, cr, rec, data_node=None):
diff --git a/bin/tools/copy.py b/bin/tools/copy.py
index e6583dcfadf..badd4d51fc5 100644
--- a/bin/tools/copy.py
+++ b/bin/tools/copy.py
@@ -164,7 +164,7 @@ d[types.InstanceType] = _copy_inst
del d
-def deepcopy(x, memo=None, _nil=[]):
+def deepcopy(x, memo=None, _nil=None):
"""Deep copy operation on arbitrary Python objects.
See the module's __doc__ string for more info.
@@ -172,6 +172,8 @@ def deepcopy(x, memo=None, _nil=[]):
if memo is None:
memo = {}
+ if _nil is None:
+ _nil = {}
d = id(x)
y = memo.get(d, _nil)
diff --git a/bin/tools/pdf_utils.py b/bin/tools/pdf_utils.py
index 4782e544429..0286b9cf46d 100644
--- a/bin/tools/pdf_utils.py
+++ b/bin/tools/pdf_utils.py
@@ -58,7 +58,7 @@ trailer
%%EOF
"""
-def output_field( f ):
+def output_field(f):
return "\xfe\xff" + "".join( [ "\x00"+c for c in f ] )
def extract_keys(lines):