Skip to content

Commit

Permalink
[FIX] fix bug in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed May 3, 2016
1 parent 7d17490 commit fa4ba28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions setuptools_odoo/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,18 +154,18 @@ def prepare_odoo_addon(depends_override={},
external_dependencies_override={},
odoo_version_override=None):
addons_dir = ADDONS_NAMESPACE
addons = os.listdir(addons_dir)
potential_addons = os.listdir(addons_dir)
# list installable addons, except auto-installable ones
# in case we want to combine an addon and it's glue modules
# in a package named after the main addon
addons = [a for a in addons
addons = [a for a in potential_addons
if is_installable_addon(os.path.join(addons_dir, a),
unless_auto_installable=True)]
if len(addons) == 0:
# if no addon is found, it may mean we are trying to package
# a single module that is marked auto-install, so let's try
# listing all installable modules
addons = [a for a in addons
addons = [a for a in potential_addons
if is_installable_addon(os.path.join(addons_dir, a))]
if len(addons) != 1:
raise DistutilsSetupError('%s must contain exactly one '
Expand Down
2 changes: 1 addition & 1 deletion tests/data/addon5/__openerp__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
'name': 'addon 5',
'summary': 'addon 4 summary',
'summary': 'addon 5 summary',
'version': '8.0.2.0.0',
'auto_install': True,
}

0 comments on commit fa4ba28

Please sign in to comment.