[MERGE] forward port branch 10.0 up to 4730a884b4

This commit is contained in:
Denis Ledoux
2019-04-23 17:16:26 +02:00
12 changed files with 236 additions and 35 deletions
@@ -28,6 +28,8 @@ class IrModule(models.Model):
installed_mods = [m.name for m in known_mods if m.state == 'installed']
terp = load_information_from_description_file(module, mod_path=path)
if not terp:
return False
values = self.get_values_from_terp(terp)
unmet_dependencies = set(terp['depends']).difference(installed_mods)
@@ -110,8 +112,8 @@ class IrModule(models.Model):
try:
# assert mod_name.startswith('theme_')
path = opj(module_dir, mod_name)
self.import_module(mod_name, path, force=force)
success.append(mod_name)
if self.import_module(mod_name, path, force=force):
success.append(mod_name)
except Exception, e:
_logger.exception('Error while importing module')
errors[mod_name] = exception_to_unicode(e)