diff options
| author | ced <> | 2007-07-23 05:16:03 +0000 |
|---|---|---|
| committer | ced <> | 2007-07-23 05:16:03 +0000 |
| commit | d9d06783284fa93bd284be1ea66d322291b1abf3 (patch) | |
| tree | 9dee34398b72067dbe4fe30ff92512665129e8d2 /bin/wizard/__init__.py | |
| parent | 4669379c8b1261a87ad1885492b6f8410a5ce6c8 (diff) | |
kernel: don't use mutable as default value in function defintion.
bzr revid: ced-824ee7e22dca5a4b4f2d8d5095aa20650f5a2469
Diffstat (limited to 'bin/wizard/__init__.py')
| -rw-r--r-- | bin/wizard/__init__.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/wizard/__init__.py b/bin/wizard/__init__.py index 08ff36574b4..88a2d59c461 100644 --- a/bin/wizard/__init__.py +++ b/bin/wizard/__init__.py @@ -56,8 +56,10 @@ class interface(netsvc.Service): node.setAttribute('string', trans.decode('utf8')) for n in node.childNodes: self.translate_view(cr, uid, n, state, lang) - - def execute_cr(self, cr, uid, data, state='init', context={}): + + def execute_cr(self, cr, uid, data, state='init', context=None): + if not context: + context={} res = {} try: state_def = self.states[state] @@ -140,7 +142,9 @@ class interface(netsvc.Service): return res - def execute(self, db, uid, data, state='init', context={}): + def execute(self, db, uid, data, state='init', context=None): + if not context: + context={} cr = pooler.get_db(db).cursor() try: try: |
