[Libguestfs] [PATCH RHEL 7.6 LP] RHEL 7.6 LP: Convert Python 3 to Python 2.

Nir Soffer nsoffer at redhat.com
Tue Aug 28 21:25:26 UTC 2018


On Wed, Aug 29, 2018 at 12:22 AM Richard W.M. Jones <rjones at redhat.com>
wrote:

> From: "Richard W.M. Jones" <rjones at redhat.com>
>
> Updates commit 8f250c00c8b028a614815f63b2713748504d7ef9 for RHEL 7.6 LP.
> ---
>  v2v/rhv-upload-plugin.py | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
> index 42c7065..3e561e6 100644
> --- a/v2v/rhv-upload-plugin.py
> +++ b/v2v/rhv-upload-plugin.py
> @@ -383,8 +383,9 @@ def pwrite(h, buf, offset):
>
>      try:
>          http.send(buf)
> -    except BrokenPipeError:
> -        pass
> +    except socket.error as e:
> +        if e.args[0] not in (errno.EPIPE, errno.ESHUTDOWN):
> +            raise
>
>      r = http.getresponse()
>      if r.status != 200:
> @@ -446,8 +447,9 @@ def emulate_zero(h, count, offset):
>                  http.send(buf)
>                  count -= len(buf)
>              http.send(buffer(buf, 0, count))
> -        except BrokenPipeError:
> -            pass
> +        except socket.error as e:
> +            if e.args[0] not in (errno.EPIPE, errno.ESHUTDOWN):
> +                raise
>
>          r = http.getresponse()
>          if r.status != 200:
> --
> 1.8.3.1
>

Looks correct.

Nir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20180829/dd52e3dc/attachment.htm>


More information about the Libguestfs mailing list