mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-26 18:06:13 +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,
|
||||
request.actions[0].src_project, request.actions[0].src_package, request.actions[0].src_rev, True, True)
|
||||
except urllib2.HTTPError, e:
|
||||
if e.code != 400:
|
||||
raise e
|
||||
if e.code == 400:
|
||||
try:
|
||||
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)
|
||||
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.flush()
|
||||
run_editor(tmpfile.name)
|
||||
|
Loading…
Reference in New Issue
Block a user