Nir Soffer
2018-Jun-25 22:43 UTC
[Libguestfs] [PATCH] v2v: rhv-upload-plugin: Remove unused variables
Remove some instances of "transfer" and "transfer_service" that are not used in current code. --- v2v/rhv-upload-plugin.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index 10887c031..5c036c46a 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -263,7 +263,6 @@ def request_failed(h, r, msg): def pread(h, count, offset): http = h['http'] transfer = h['transfer'] - transfer_service = h['transfer_service'] headers = {"Range", "bytes=%d-%d" % (offset, offset+count-1)} # Authorization is only needed for old imageio. @@ -309,7 +308,6 @@ def pwrite(h, buf, offset): def zero(h, count, offset, may_trim): http = h['http'] - transfer = h['transfer'] # Unlike the trim and flush calls, there is no 'can_zero' method # so nbdkit could call this even if the server doesn't support @@ -371,7 +369,6 @@ def emulate_zero(h, count, offset): def trim(h, count, offset): http = h['http'] - transfer = h['transfer'] # Construct the JSON request for trimming. buf = json.dumps({'op': "trim", @@ -394,7 +391,6 @@ def trim(h, count, offset): def flush(h): http = h['http'] - transfer = h['transfer'] # Construct the JSON request for flushing. buf = json.dumps({'op': "flush"}).encode() -- 2.17.1
Richard W.M. Jones
2018-Jun-26 07:42 UTC
Re: [Libguestfs] [PATCH] v2v: rhv-upload-plugin: Remove unused variables
On Tue, Jun 26, 2018 at 01:43:01AM +0300, Nir Soffer wrote:> Remove some instances of "transfer" and "transfer_service" that are not > used in current code. > --- > v2v/rhv-upload-plugin.py | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py > index 10887c031..5c036c46a 100644 > --- a/v2v/rhv-upload-plugin.py > +++ b/v2v/rhv-upload-plugin.py > @@ -263,7 +263,6 @@ def request_failed(h, r, msg): > def pread(h, count, offset): > http = h['http'] > transfer = h['transfer'] > - transfer_service = h['transfer_service'] > > headers = {"Range", "bytes=%d-%d" % (offset, offset+count-1)} > # Authorization is only needed for old imageio. > @@ -309,7 +308,6 @@ def pwrite(h, buf, offset): > > def zero(h, count, offset, may_trim): > http = h['http'] > - transfer = h['transfer'] > > # Unlike the trim and flush calls, there is no 'can_zero' method > # so nbdkit could call this even if the server doesn't support > @@ -371,7 +369,6 @@ def emulate_zero(h, count, offset): > > def trim(h, count, offset): > http = h['http'] > - transfer = h['transfer'] > > # Construct the JSON request for trimming. > buf = json.dumps({'op': "trim", > @@ -394,7 +391,6 @@ def trim(h, count, offset): > > def flush(h): > http = h['http'] > - transfer = h['transfer'] > > # Construct the JSON request for flushing. > buf = json.dumps({'op': "flush"}).encode()Thanks - I have pushed this. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Reasonably Related Threads
- [PATCH v2] v2v: -o rhv-upload: Log full imageio response on failure.
- [PATCH] v2v: Log full imageio response on failure.
- Re: [PATCH 06/18] rhv-upload: Fix cleanup after errors
- [PATCH 0/2] rhv-upload: Complete refactoring
- [PATCH v2] v2v: -o rhv-upload: Log full imageio response on failure.