mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 10:16:14 +01:00
- request_interactive_review: don't abort if the diff fails due to status 404
This commit is contained in:
parent
d5c91babc1
commit
9ac19b2c22
20
osc/core.py
20
osc/core.py
@ -5078,10 +5078,26 @@ def request_interactive_review(apiurl, request):
|
|||||||
diff = server_diff(apiurl, request.actions[0].dst_project, request.actions[0].dst_package, None,
|
diff = server_diff(apiurl, request.actions[0].dst_project, request.actions[0].dst_package, None,
|
||||||
request.actions[0].src_project, request.actions[0].src_package, request.actions[0].src_rev, True, True)
|
request.actions[0].src_project, request.actions[0].src_package, request.actions[0].src_rev, True, True)
|
||||||
except urllib2.HTTPError, e:
|
except urllib2.HTTPError, e:
|
||||||
if e.code != 400:
|
if e.code == 400:
|
||||||
raise e
|
try:
|
||||||
diff = server_diff(apiurl, request.actions[0].dst_project, request.actions[0].dst_package, None,
|
diff = server_diff(apiurl, request.actions[0].dst_project, request.actions[0].dst_package, None,
|
||||||
request.actions[0].src_project, request.actions[0].src_package, request.actions[0].src_rev, True, False)
|
request.actions[0].src_project, request.actions[0].src_package, request.actions[0].src_rev, True, False)
|
||||||
|
except urllib2.HTTPError, e:
|
||||||
|
tmpfile.close()
|
||||||
|
tmpfile = None
|
||||||
|
if e.code != 404:
|
||||||
|
raise e
|
||||||
|
root = ET.fromstring(e.read())
|
||||||
|
print >>sys.stderr, root.find('summary').text
|
||||||
|
continue
|
||||||
|
elif e.code == 404:
|
||||||
|
tmpfile.close()
|
||||||
|
tmpfile = None
|
||||||
|
root = ET.fromstring(e.read())
|
||||||
|
print >>sys.stderr, root.find('summary').text
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
raise e
|
||||||
tmpfile.write(diff)
|
tmpfile.write(diff)
|
||||||
tmpfile.flush()
|
tmpfile.flush()
|
||||||
run_editor(tmpfile.name)
|
run_editor(tmpfile.name)
|
||||||
|
Loading…
Reference in New Issue
Block a user