mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-11 13:38:21 +01:00
Add error message to only_children_to...
This commit is contained in:
parent
30ba1fb5c4
commit
0199fc1374
@ -6,7 +6,8 @@ Create the NEEDED_MODULE aka the genealogy (children module, subchildren module
|
|||||||
of a NEEDED_CHILDREN_MODULES file
|
of a NEEDED_CHILDREN_MODULES file
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
only_children_to_all_genealogy.py [--create_png] [<NEEDED_CHILDREN_MODULES>]
|
only_children_to_all_genealogy.py [<NEEDED_CHILDREN_MODULES>]
|
||||||
|
[--create_png]
|
||||||
|
|
||||||
Help:
|
Help:
|
||||||
If NEEDED_CHILDREN_MODULES is not set, check the current pwd
|
If NEEDED_CHILDREN_MODULES is not set, check the current pwd
|
||||||
@ -16,6 +17,7 @@ Help:
|
|||||||
from docopt import docopt
|
from docopt import docopt
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import os.path
|
import os.path
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
@ -87,7 +89,12 @@ def get_it_and_children(l_module):
|
|||||||
for module in l_module:
|
for module in l_module:
|
||||||
if module not in l:
|
if module not in l:
|
||||||
l.append(module)
|
l.append(module)
|
||||||
|
try:
|
||||||
l.extend(get_it_and_children(d_ref[module]))
|
l.extend(get_it_and_children(d_ref[module]))
|
||||||
|
except KeyError:
|
||||||
|
print >> sys.stderr, "`{0}` in not a good submodule name".format(module)
|
||||||
|
print >> sys.stderr, "Check the corresponding NEEDED_CHILDREN_MODULES"
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
return list(set(l))
|
return list(set(l))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user