Mercurial > libervia-backend
comparison src/sat.tac @ 288:76247af9917c
core: added plugin dependency not found import error
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 06 Feb 2011 23:32:13 +0100 |
parents | 2720536b5a22 |
children | f7bd973bba5a |
comparison
equal
deleted
inserted
replaced
287:2720536b5a22 | 288:76247af9917c |
---|---|
407 debug('Plugin [%s] already imported, passing' % import_name) | 407 debug('Plugin [%s] already imported, passing' % import_name) |
408 return | 408 return |
409 if not import_name: | 409 if not import_name: |
410 import_name,(plugin_path, mod, plugin_info) = plugins_to_import.popitem() | 410 import_name,(plugin_path, mod, plugin_info) = plugins_to_import.popitem() |
411 else: | 411 else: |
412 if not import_name in plugins_to_import: | |
413 raise ImportError(_('Dependency plugin not found: [%s]') % import_name) | |
412 plugin_path, mod, plugin_info = plugins_to_import.pop(import_name) | 414 plugin_path, mod, plugin_info = plugins_to_import.pop(import_name) |
413 dependencies = plugin_info.setdefault("dependencies",[]) | 415 dependencies = plugin_info.setdefault("dependencies",[]) |
414 for dependency in dependencies: | 416 for dependency in dependencies: |
415 if not self.plugins.has_key(dependency): | 417 if not self.plugins.has_key(dependency): |
416 debug('Recursively import dependency of [%s]: [%s]' % (import_name, dependency)) | 418 debug('Recursively import dependency of [%s]: [%s]' % (import_name, dependency)) |