Reviewers: , Description: Improved Error management when registering module
Please review this at http://codereview.tryton.org/545002/ Affected files: M trytond/modules/__init__.py Index: trytond/modules/__init__.py =================================================================== --- a/trytond/modules/__init__.py +++ b/trytond/modules/__init__.py @@ -343,9 +343,13 @@ try: imp.load_module('trytond.modules.' + module, mod_file, pathname, description).register() - except AttributeError: - # Some modules register nothing in the Pool - pass + except AttributeError, e: + if e.args[0].rsplit(" '", 1)[1][:-1] == 'register': + # Some modules register nothing in the Pool + pass + else: + # If the missing attribute is not 'register', raise. + raise finally: if mod_file is not None: mod_file.close() -- [email protected] mailing list
