[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():
|
def check_modules():
|
||||||
ok = True
|
errors = []
|
||||||
for modname, desc in required_modules:
|
for modname, desc in required_modules:
|
||||||
try:
|
try:
|
||||||
imp.find_module(modname)
|
imp.find_module(modname)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
ok = False
|
errors.append(
|
||||||
print 'Error: python module %s (%s) is required' % (modname, desc)
|
'Error: python module %s (%s) is required' % (modname, desc))
|
||||||
|
|
||||||
if not ok:
|
if errors:
|
||||||
|
print '\n'.join(errors)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
def _find_addons():
|
def _find_addons():
|
||||||
|
|
Loading…
Reference in New Issue