diff options
| author | Xavier Morel <xmo@odoo.com> | 2018-07-19 13:35:27 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2018-07-19 13:37:10 +0200 |
| commit | 9f8eae34d1d89d7cf01eef8a1a89dc431ef5f4e2 (patch) | |
| tree | aea6469290c6969d941c729e47b6722781ef51db /odoo/modules/migration.py | |
| parent | bc12428e174dcba94d86e855cbeba0e77da9b747 (diff) | |
[FIX] undefined variables (potential nameerror)
Backport 9ec0455abc041b855dcab18e8e185baf806b9f14 and
6a601fe6dc848cdeca2ab8429210e3b5087275d9 as they fixed various
possible NameError but did so in later sub-releases.
Diffstat (limited to 'odoo/modules/migration.py')
| -rw-r--r-- | odoo/modules/migration.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/odoo/modules/migration.py b/odoo/modules/migration.py index e512d331caa..28a9c1c170d 100644 --- a/odoo/modules/migration.py +++ b/odoo/modules/migration.py @@ -21,7 +21,8 @@ if pycompat.PY2: fp, fname = tools.file_open(path, pathinfo=True) fp2 = None - if not isinstance(fp, file): # pylint: disable=file-builtin + # pylint: disable=file-builtin,undefined-variable + if not isinstance(fp, file): # imp.load_source need a real file object, so we create # one from the file-like object we get from file_open fp2 = os.tmpfile() |
