Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpcdf
obs
osc-plugins
Commits
7bec0f4e
Commit
7bec0f4e
authored
Apr 06, 2020
by
Lorenz Hüdepohl
Browse files
Allow to set an attribute to the empty list
parent
09e14fe9
Pipeline
#72315
passed with stage
in 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
mpcdf_enable_repositories.py
View file @
7bec0f4e
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment