mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
kernelupload: Fix it with python3
This commit is contained in:
parent
1994b4cf2d
commit
bf458c2274
@ -93,7 +93,7 @@ def _upload_file(conn, meter, destpool, src):
|
||||
vol.upload(stream, offset, length, flags)
|
||||
|
||||
# Open source file
|
||||
fileobj = open(src, "r")
|
||||
fileobj = open(src, "rb")
|
||||
|
||||
# Start transfer
|
||||
total = 0
|
||||
@ -114,8 +114,7 @@ def _upload_file(conn, meter, destpool, src):
|
||||
stream.finish()
|
||||
meter.end(size)
|
||||
except Exception:
|
||||
if vol:
|
||||
vol.delete(0)
|
||||
vol.delete(0)
|
||||
raise
|
||||
|
||||
return vol
|
||||
|
Loading…
Reference in New Issue
Block a user