diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-01-26 15:46:24 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-01-26 15:46:24 +0100 |
| commit | e19ec6a8be9fb6ae857199b7048e3294aa68ab8b (patch) | |
| tree | 9de8239d328f908fa4bc6574b1c0bc674a09f797 /setup | |
| parent | 1f3ab82f773e1497d8c1258a608bd1f402b40181 (diff) | |
| parent | 4e6251581905d74fd3f48a538c259f8a3425d2de (diff) | |
[MERGE] forward port of branch 8.0 up to 4e62515
Diffstat (limited to 'setup')
| -rwxr-xr-x | setup/package.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/setup/package.py b/setup/package.py index 9ca97d19dd9..71de37bbf99 100755 --- a/setup/package.py +++ b/setup/package.py @@ -246,9 +246,14 @@ def _prepare_build_dir(o, win32=False): if not win32: cmd += ['--exclude', 'setup/win32'] system(cmd + ['%s/' % o.odoo_dir, o.build_dir]) - for i in glob(join(o.build_dir, 'addons/*')): - if i.split(os.path.sep)[-1] not in ADDONS_NOT_TO_PUBLISH: - shutil.move(i, join(o.build_dir, 'openerp/addons')) + try: + for addon_path in glob(join(o.build_dir, 'addons/*')): + if addon_path.split(os.path.sep)[-1] not in ADDONS_NOT_TO_PUBLISH: + shutil.move(addon_path, join(o.build_dir, 'openerp/addons')) + except shutil.Error: + # Thrown when the add-on is already in openerp/addons (if _prepare_build_dir + # has already been called once) + pass def build_tgz(o): system(['python2', 'setup.py', 'sdist', '--quiet', '--formats=gztar,zip'], o.build_dir) |
