Commit b9a66e31 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Better error messages

parent 443e2b50
Pipeline #67052 failed with stage
in 14 seconds
......@@ -138,6 +138,7 @@ def remove_attribute(api_url, project, package, attribute_name):
def mpcdf_enable_repositories(api_url, project, package, verbose=False):
from itertools import product
import sys
root = ElementTree.fromstringlist(osc.core.show_package_meta(api_url, project, package))
build = root.find("./build")
......@@ -152,9 +153,23 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False):
mpis = get_attribute_values(api_url, project, package, "MPCDF:mpi_modules", with_project=True)
cudas = get_attribute_values(api_url, project, package, "MPCDF:cuda_modules", with_project=True)
default_compilers = get_attribute_values(api_url, project, None, "MPCDF:default_compiler")
default_mpis = get_attribute_values(api_url, project, None, "MPCDF:default_mpi")
default_cudas = get_attribute_values(api_url, project, None, "MPCDF:default_cuda")
try:
default_compilers = get_attribute_values(api_url, project, None, "MPCDF:default_compiler")
except UnsetAttributeException:
print("ERROR: Attribute MPCDF:default_compiler not set for project", file=sys.stderr)
raise SystemExit(1)
try:
default_mpis = get_attribute_values(api_url, project, None, "MPCDF:default_mpi")
except UnsetAttributeException:
print("ERROR: Attribute MPCDF:default_mpi not set for project", file=sys.stderr)
raise SystemExit(1)
try:
default_cudas = get_attribute_values(api_url, project, None, "MPCDF:default_cuda")
except UnsetAttributeException:
print("ERROR: Attribute MPCDF:default_cuda not set for project", file=sys.stderr)
raise SystemExit(1)
def enable(name):
node = ElementTree.Element("enable")
......
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