1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-13 17:16:23 +01:00

- trying a fallback in maintenance project detection

Evergreen project users not using their Evergreen:Maintenenace attribute
submit to the wrong place atm.
This commit is contained in:
Adrian Schröter 2015-01-09 11:20:51 +01:00
parent 8c8618ac91
commit fbbf945deb

View File

@ -3961,7 +3961,13 @@ def create_submit_request(apiurl,
print("WARNING:") print("WARNING:")
print("WARNING: Project does not accept submit request, request to open a NEW maintenance incident instead") print("WARNING: Project does not accept submit request, request to open a NEW maintenance incident instead")
print("WARNING:") print("WARNING:")
xpath = 'attribute/@name = \'%s\'' % 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)
root = res['project_id']
project = root.find('project')
if project is None:
print("WARNING: This project is not maintained in the maintenance project specified by '%s', looking elsewhere" % conf.config['maintenance_attribute'])
xpath = 'maintenance/maintains/@project = \'%s\'' % dst_project
res = search(apiurl, project_id=xpath) res = search(apiurl, project_id=xpath)
root = res['project_id'] root = res['project_id']
project = root.find('project') project = root.find('project')