mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
v2v: rhv-upload-plugin: Fix error formatting
Fix the error format so we actually format the arguments instead of
raising the format string and the arguments.
Here is an upload error formatted correctly with this change:
nbdkit: python[1]: error: /home/nsoffer/src/libguestfs/tmp/v2v.eC5yCl/rhv-upload-plugin.py:
pwrite: error: could not write sector offset 218911744 size 3584: 403 Forbidden:
b'{"explanation": "Access was denied to this resource.", "code": 403, "detail":
"Ticket u\'61ac0483-48e3-4984-84d6-438884ba8bb2\' expired", "title": "Forbidden"}'
This commit is contained in:
committed by
Richard W.M. Jones
parent
a651169085
commit
1368b1bb7d
@@ -317,7 +317,7 @@ def request_failed(h, r, msg):
|
||||
debug(body)
|
||||
|
||||
# Only a short error is included in the exception.
|
||||
raise RuntimeError("%s: %d %s: %r", msg, status, reason, body[:200])
|
||||
raise RuntimeError("%s: %d %s: %r" % (msg, status, reason, body[:200]))
|
||||
|
||||
# For documentation see:
|
||||
# https://github.com/oVirt/ovirt-imageio/blob/master/docs/random-io.md
|
||||
|
||||
Reference in New Issue
Block a user