mirror of
https://github.com/containers/podman-compose.git
synced 2024-11-22 16:03:16 +01:00
Simplify var assignment
This commit is contained in:
parent
0057a4bb31
commit
606b9d94c8
@ -190,12 +190,11 @@ def fix_mount_dict(compose, mount_dict, proj_name, srv_name):
|
|||||||
elif not name:
|
elif not name:
|
||||||
external = vol.get("external", None)
|
external = vol.get("external", None)
|
||||||
if isinstance(external, dict):
|
if isinstance(external, dict):
|
||||||
ext_name = external.get("name", f"{source}")
|
vol["name"] = external.get("name", f"{source}")
|
||||||
elif external:
|
elif external:
|
||||||
ext_name = f"{source}"
|
vol["name"] = f"{source}"
|
||||||
else:
|
else:
|
||||||
ext_name = None
|
vol["name"] = f"{proj_name}_{source}"
|
||||||
vol["name"] = ext_name if ext_name else f"{proj_name}_{source}"
|
|
||||||
return mount_dict
|
return mount_dict
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user