From 7bec0f4e3a662b52100e9ee4f9debe57d5e3e1fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCdepohl?= <dev@stellardeath.org> Date: Mon, 6 Apr 2020 12:19:10 +0200 Subject: [PATCH] Allow to set an attribute to the empty list --- mpcdf_enable_repositories.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpcdf_enable_repositories.py b/mpcdf_enable_repositories.py index 25c32bf..289c0dc 100644 --- a/mpcdf_enable_repositories.py +++ b/mpcdf_enable_repositories.py @@ -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(",")) def set_or_remove(flag, attribute_name): - if flag: + if flag is not None: print("Setting attribute", attribute_name, "to", flag) mpcdf_common.set_attribute_values(api_url, project, package, attribute_name, flag.split(",")) elif mpcdf_common.has_attribute(api_url, project, package, attribute_name): -- GitLab