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

Add check for unconfigured packages in mpcdf_push

parent 53cc94f8
......@@ -73,6 +73,11 @@ def do_mpcdf_push(self, subcmd, opts, *args):
raise e
if not mpcdf_common.has_attribute(api_url, from_project, package, "MPCDF:enable_repositories"):
print("ERROR: Package is unmanaged.\n"
"Configure the enabled repositories first, with `osc mpcdf_enable_repositories`", file=sys.stderr)
raise SystemExit(1)
req_id = osc.core.create_submit_request(api_url, from_project, package, dst_project=to_project,
message="Update {0} from {1}".format(package, from_project) if not opts.message else opts.message)
print("Submitted package {0} to {1} in request {2}".format(package, to_project, req_id))
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