Skip to content
Snippets Groups Projects
Commit 7bec0f4e authored by Lorenz Hüdepohl's avatar Lorenz Hüdepohl
Browse files

Allow to set an attribute to the empty list

parent 09e14fe9
No related branches found
No related tags found
No related merge requests found
Pipeline #72315 passed
...@@ -77,7 +77,7 @@ def do_mpcdf_enable_repositories(self, subcmd, opts, *args): ...@@ -77,7 +77,7 @@ def do_mpcdf_enable_repositories(self, subcmd, opts, *args):
mpcdf_common.set_attribute_values(api_url, project, package, "MPCDF:enable_repositories", opts.set.split(",")) mpcdf_common.set_attribute_values(api_url, project, package, "MPCDF:enable_repositories", opts.set.split(","))
def set_or_remove(flag, attribute_name): def set_or_remove(flag, attribute_name):
if flag: if flag is not None:
print("Setting attribute", attribute_name, "to", flag) print("Setting attribute", attribute_name, "to", flag)
mpcdf_common.set_attribute_values(api_url, project, package, attribute_name, flag.split(",")) mpcdf_common.set_attribute_values(api_url, project, package, attribute_name, flag.split(","))
elif mpcdf_common.has_attribute(api_url, project, package, attribute_name): elif mpcdf_common.has_attribute(api_url, project, package, attribute_name):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment