Re: [PATCH v3 4/5] iotests: make qemu_img raise on non-zero rc by default

2022-03-17 Thread Hanna Reitz
On 08.03.22 02:57, John Snow wrote: re-write qemu_img() as a function that will by default raise a VerboseProcessException (extended from CalledProcessException) on non-zero return codes. This will produce a stack trace that will show the command line arguments and return code from the failed

Re: [PATCH v3 4/5] iotests: make qemu_img raise on non-zero rc by default

2022-03-17 Thread Hanna Reitz
On 17.03.22 16:24, John Snow wrote: On Thu, Mar 17, 2022 at 6:25 AM Hanna Reitz wrote: On 08.03.22 02:57, John Snow wrote: +if check and subp.returncode or (subp.returncode < 0): I wouldn’t expect these parentheses here in any other language, are they required in Python? It's not

Re: [PATCH v3 4/5] iotests: make qemu_img raise on non-zero rc by default

2022-03-17 Thread John Snow
On Thu, Mar 17, 2022 at 6:25 AM Hanna Reitz wrote: > > On 08.03.22 02:57, John Snow wrote: > > +if check and subp.returncode or (subp.returncode < 0): > > I wouldn’t expect these parentheses here in any other language, are they > required in Python? > It's not required, I just find it

Re: [PATCH v3 4/5] iotests: make qemu_img raise on non-zero rc by default

2022-03-17 Thread John Snow
On Thu, Mar 17, 2022, 6:41 AM Hanna Reitz wrote: > On 17.03.22 11:25, Hanna Reitz wrote: > > On 08.03.22 02:57, John Snow wrote: > >> re-write qemu_img() as a function that will by default raise a > >> VerboseProcessException (extended from CalledProcessException) on > >> non-zero return codes.

Re: [PATCH v3 4/5] iotests: make qemu_img raise on non-zero rc by default

2022-03-17 Thread Hanna Reitz
On 17.03.22 11:25, Hanna Reitz wrote: On 08.03.22 02:57, John Snow wrote: re-write qemu_img() as a function that will by default raise a VerboseProcessException (extended from CalledProcessException) on non-zero return codes. This will produce a stack trace that will show the command line

Re: [PATCH v3 4/5] iotests: make qemu_img raise on non-zero rc by default

2022-03-17 Thread Hanna Reitz
On 08.03.22 02:57, John Snow wrote: re-write qemu_img() as a function that will by default raise a VerboseProcessException (extended from CalledProcessException) on non-zero return codes. This will produce a stack trace that will show the command line arguments and return code from the failed

[PATCH v3 4/5] iotests: make qemu_img raise on non-zero rc by default

2022-03-07 Thread John Snow
re-write qemu_img() as a function that will by default raise a VerboseProcessException (extended from CalledProcessException) on non-zero return codes. This will produce a stack trace that will show the command line arguments and return code from the failed process run. Users that want something