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

Do not duplicate attribute definitions, use from module

parent d773a805
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment