summaryrefslogtreecommitdiff
path: root/addons/base_import_module/models/ir_module.py
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2017-08-18 18:43:46 +0200
committerOlivier Dony <odo@openerp.com>2017-08-20 23:25:54 +0200
commit695716efb0f79f9a0e716952b1dcd433d866371a (patch)
tree1b582a3469d12fc716d6252b4f239f0cd40da9e4 /addons/base_import_module/models/ir_module.py
parent589c0d7e2c3a44adc5d26aac8af08c0d06b97d5a (diff)
[FIX] P3: remove pycompat.{keys,items,values} helpers
Now that we're closer to switching to P3 for good, these helpers have outlived their usefulness, and mostly add noise. All remaining dict.iter*() or dict.view*() must be converted to the normal keys(), values() or items() calls. Whenever the result is likely to be used for more than the scope of a loop, or when the dict needs to be modified during iteration, the calls must be wrapped in a ``list()``, to protect the new P3 semantics. Those cases are very exceptional. Also removed some dead code or improved the API to remove unnecessary conversions.
Diffstat (limited to 'addons/base_import_module/models/ir_module.py')
-rw-r--r--addons/base_import_module/models/ir_module.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/base_import_module/models/ir_module.py b/addons/base_import_module/models/ir_module.py
index d6bb62a4d46..5bad5ea53eb 100644
--- a/addons/base_import_module/models/ir_module.py
+++ b/addons/base_import_module/models/ir_module.py
@@ -9,7 +9,7 @@ from os.path import join as opj
from odoo import api, fields, models, _
from odoo.exceptions import UserError
from odoo.modules import load_information_from_description_file
-from odoo.tools import convert_file, exception_to_unicode, pycompat
+from odoo.tools import convert_file, exception_to_unicode
from odoo.tools.osutil import tempdir
_logger = logging.getLogger(__name__)
@@ -119,6 +119,6 @@ class IrModule(models.Model):
finally:
addons.module.ad_paths.remove(module_dir)
r = ["Successfully imported module '%s'" % mod for mod in success]
- for mod, error in pycompat.items(errors):
+ for mod, error in errors.items():
r.append("Error while importing module '%s': %r" % (mod, error))
return '\n'.join(r), module_names