[imp] remove unclear boolean flags, replace with error list
bzr revid: xmo@tinyerp.com-20091212160237-n6r949cimnwlrzvj
This commit is contained in:
parent
7daf1bc09a
commit
7b50872ce4
9
setup.py
9
setup.py
|
@ -62,15 +62,16 @@ required_modules = [
|
|||
]
|
||||
|
||||
def check_modules():
|
||||
ok = True
|
||||
errors = []
|
||||
for modname, desc in required_modules:
|
||||
try:
|
||||
imp.find_module(modname)
|
||||
except ImportError:
|
||||
ok = False
|
||||
print 'Error: python module %s (%s) is required' % (modname, desc)
|
||||
errors.append(
|
||||
'Error: python module %s (%s) is required' % (modname, desc))
|
||||
|
||||
if not ok:
|
||||
if errors:
|
||||
print '\n'.join(errors)
|
||||
sys.exit(1)
|
||||
|
||||
def _find_addons():
|
||||
|
|
Loading…
Reference in New Issue