mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-13 01:06:15 +01:00
- request_interactive_review: use request_diff
(old diff method is kept for backward compatibility)
This commit is contained in:
parent
f707e9a22e
commit
7927b83c1c
@ -6067,6 +6067,13 @@ def request_interactive_review(apiurl, request, initial_cmd=''):
|
||||
tmpfile = None
|
||||
if tmpfile is None:
|
||||
tmpfile = tempfile.NamedTemporaryFile(suffix='.diff')
|
||||
try:
|
||||
diff = request_diff(apiurl, request.reqid)
|
||||
tmpfile.write(diff)
|
||||
except urllib2.HTTPError as e:
|
||||
if e.code != 400:
|
||||
raise
|
||||
# backward compatible diff for old apis
|
||||
for action in sr_actions:
|
||||
diff = 'old: %s/%s\nnew: %s/%s\n' % (action.src_project, action.src_package,
|
||||
action.tgt_project, action.tgt_package)
|
||||
|
Loading…
Reference in New Issue
Block a user