Commit 5724de66 authored by Lorenz Hüdepohl's avatar Lorenz Hüdepohl
Browse files

Do not duplicate attribute definitions, use from module

parent d773a805
......@@ -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
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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment