try:
__import__("wizard.app." + name)
return getattr(wizard.app, name).Application(name)
- except ImportError:
- return Application(name)
+ except ImportError as error:
+ # XXX ugly hack to check if the import error is from the top level
+ # module we care about or a submodule. should be an archetectural change.
+ if error.args[0].split()[-1]==name:
+ return Application(name)
+ else:
+ raise
class ApplicationVersion(object):
"""Represents an abstract notion of a version for an application, where