1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-24 11:12:14 +01:00

Trying to improve maintenance warning

Based on a suggesstion of

Co-Author: Jan Zerebecki <jzerebecki@suse.com>
This commit is contained in:
Adrian Schröter 2022-03-23 09:30:21 +01:00
parent b83aee10f5
commit 2912c1f34f
No known key found for this signature in database
GPG Key ID: 918D8C954C08DB67

View File

@ -4302,9 +4302,9 @@ def create_submit_request(apiurl,
r = root.get('id') r = root.get('id')
except HTTPError as e: except HTTPError as e:
if e.hdrs.get('X-Opensuse-Errorcode') == "submit_request_rejected": if e.hdrs.get('X-Opensuse-Errorcode') == "submit_request_rejected":
print("WARNING:") print('WARNING: As the project is in maintenance, a maintenance incident request is')
print("WARNING: Project does not accept submit request, a NEW maintenance incident request will be created instead") print('WARNING: being created (instead of a regular submit request). If this is not your')
print("WARNING:") print('WARNING: intention please revoke it to avoid unnecessary work for all involved parties.')
xpath = 'maintenance/maintains/@project = \'%s\' and attribute/@name = \'%s\'' % (dst_project, conf.config['maintenance_attribute']) xpath = 'maintenance/maintains/@project = \'%s\' and attribute/@name = \'%s\'' % (dst_project, conf.config['maintenance_attribute'])
res = search(apiurl, project_id=xpath) res = search(apiurl, project_id=xpath)
root = res['project_id'] root = res['project_id']