mirror of
https://github.com/LCPQ/quantum_package
synced 2024-11-18 12:03:57 +01:00
Cleaning module_handler
This commit is contained in:
parent
8accde8b19
commit
82d74710bd
@ -29,7 +29,9 @@ except ImportError:
|
|||||||
|
|
||||||
# Canot cache for namedtuple are not hashable
|
# Canot cache for namedtuple are not hashable
|
||||||
def is_module(path_module):
|
def is_module(path_module):
|
||||||
return os.path.isfile(os.path.join(path_module, "NEEDED_CHILDREN_MODULES"))
|
return os.path.isfile(os.path.join(QP_SRC,
|
||||||
|
path_module,
|
||||||
|
"NEEDED_CHILDREN_MODULES"))
|
||||||
|
|
||||||
|
|
||||||
def get_dict_child(l_root_abs=None):
|
def get_dict_child(l_root_abs=None):
|
||||||
@ -208,6 +210,12 @@ if __name__ == '__main__':
|
|||||||
l_module = [os.path.basename(dir_)]
|
l_module = [os.path.basename(dir_)]
|
||||||
else:
|
else:
|
||||||
l_module = arguments['<module_name>']
|
l_module = arguments['<module_name>']
|
||||||
|
|
||||||
|
for module in l_module:
|
||||||
|
if not is_module(module):
|
||||||
|
print "{0} is not a module. Abort".format(module)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
# else:
|
# else:
|
||||||
# path_file = os.path.abspath(arguments['<module_name>'])
|
# path_file = os.path.abspath(arguments['<module_name>'])
|
||||||
# dir_ = os.path.dirname(path_file)
|
# dir_ = os.path.dirname(path_file)
|
||||||
|
Loading…
Reference in New Issue
Block a user