From 24162a7296f1b047912d752d8feb73c0dfc62e01 Mon Sep 17 00:00:00 2001 From: Arnaud Fontaine <arnaud.fontaine@nexedi.com> Date: Thu, 1 Mar 2012 18:03:47 +0900 Subject: [PATCH] Cosmetic. --- product/ERP5Type/dynamic/component_package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/product/ERP5Type/dynamic/component_package.py b/product/ERP5Type/dynamic/component_package.py index ddf0e248ba..0a31d20405 100644 --- a/product/ERP5Type/dynamic/component_package.py +++ b/product/ERP5Type/dynamic/component_package.py @@ -267,12 +267,12 @@ class ComponentDynamicPackage(ModuleType): recursively. This method must be called within a lock to avoid side effects """ - if sub_package is None: + if sub_package: + package = sub_package + else: # Clear the Component registry self.__registry_dict.clear() package = self - else: - package = sub_package for name, module in package.__dict__.items(): if name[0] == '_' or not isinstance(module, ModuleType): -- 2.30.9