Skip to content

Commit

Permalink
fixed issue with import_module
Browse files Browse the repository at this point in the history
  • Loading branch information
toumorokoshi committed Jan 28, 2015
1 parent 4335eba commit 7b8c44f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
]

setup(name='uranium',
version='0.0.39',
version='0.0.40',
description='a build system for python',
long_description='a build system for python',
author='Yusuke Tsutsumi',
Expand Down
7 changes: 5 additions & 2 deletions uranium/classloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ def get_class_from_spec(self, class_spec):
if ':' in class_spec:
egg_name, module_path = class_spec.split(':')

if not import_module(module_path) and egg_name:
self._install_egg(egg_name)
try:
import_module(module_path)
except ImportError:
if egg_name:
self._install_egg(egg_name)

return self.get_class(module_path)

Expand Down

0 comments on commit 7b8c44f

Please sign in to comment.