[FIX] script pycharm_configuration: support iml when contain 1 component
This commit is contained in:
parent
892e64b0cb
commit
2f73a67227
1 changed files with 11 additions and 3 deletions
|
|
@ -340,9 +340,17 @@ def add_exclude_folder(dct_xml, file_name, config):
|
||||||
die(
|
die(
|
||||||
not bool(lst_component), f"Missing 'module/component' into {file_name}"
|
not bool(lst_component), f"Missing 'module/component' into {file_name}"
|
||||||
)
|
)
|
||||||
dct_component = [
|
if type(lst_component) is list:
|
||||||
a for a in lst_component if a.get("@name") == "NewModuleRootManager"
|
dct_component = [
|
||||||
]
|
a
|
||||||
|
for a in lst_component
|
||||||
|
if a.get("@name") == "NewModuleRootManager"
|
||||||
|
]
|
||||||
|
elif type(lst_component) is dict:
|
||||||
|
dct_component = [lst_component]
|
||||||
|
else:
|
||||||
|
raise Exception(f"Wrong value for {lst_component}")
|
||||||
|
|
||||||
die(
|
die(
|
||||||
not bool(dct_component),
|
not bool(dct_component),
|
||||||
"Missing 'module/component @name NewModuleRootManager' into"
|
"Missing 'module/component @name NewModuleRootManager' into"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue