Skip to content
GitLab
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
5724de66
Commit
5724de66
authored
Nov 05, 2020
by
Lorenz Hüdepohl
Browse files
Do not duplicate attribute definitions, use from module
parent
d773a805
Changes
1
Hide whitespace changes
Inline
Side-by-side
mpcdf_push.py
View file @
5724de66
...
...
@@ -69,9 +69,6 @@ def do_mpcdf_push(self, subcmd, opts, *args):
api_url
=
self
.
get_api_url
()
project_attributes
=
[
"MPCDF:compiler_modules"
,
"MPCDF:cuda_modules"
,
"MPCDF:mpi_modules"
]
package_attributes
=
[
"MPCDF:enable_repositories"
]
+
project_attributes
try
:
existing_maintainers
=
mpcdf_common
.
maintainers
(
api_url
,
to_project
,
package
)
except
osc
.
core
.
HTTPError
as
e
:
...
...
@@ -121,7 +118,7 @@ def do_mpcdf_push(self, subcmd, opts, *args):
entries
=
ElementTree
.
fromstringlist
(
osc
.
core
.
streamfile
(
url
,
osc
.
core
.
http_GET
))
if
entries
.
find
(
'./entry[@name="{0}"]'
.
format
(
package
))
is
not
None
:
for
attribute
in
package
_attributes
:
for
attribute
in
mpcdf_common
.
package_attributes
+
mpcdf_common
.
config
_attributes
:
if
mpcdf_common
.
has_attribute
(
api_url
,
from_project
,
package
,
attribute
):
print
(
"Setting attribute"
,
attribute
)
attr
=
mpcdf_common
.
get_attribute
(
api_url
,
from_project
,
package
,
attribute
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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