* [PATCH] meson: Use subprocess.check_output()
@ 2023-08-12 9:11 Akihiko Odaki
2023-08-12 9:51 ` Michael Tokarev
2023-08-23 8:33 ` Thomas Huth
0 siblings, 2 replies; 6+ messages in thread
From: Akihiko Odaki @ 2023-08-12 9:11 UTC (permalink / raw)
Cc: qemu-devel, Philippe Mathieu-Daudé, Thomas Huth,
Daniel P . Berrangé, Marc-André Lureau, Paolo Bonzini,
Cleber Rosa, John Snow, Michael Tokarev, Akihiko Odaki
subprocess.check_output() is a more concise way to execute a subprocess
here.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
Based-on: <20230812061540.5398-1-akihiko.odaki@daynix.com>
("[PATCH] meson: Fix MESONINTROSPECT parsing")
scripts/symlink-install-tree.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/symlink-install-tree.py b/scripts/symlink-install-tree.py
index b72563895c..56d603588f 100644
--- a/scripts/symlink-install-tree.py
+++ b/scripts/symlink-install-tree.py
@@ -15,8 +15,7 @@ def destdir_join(d1: str, d2: str) -> str:
return str(PurePath(d1, *PurePath(d2).parts[1:]))
introspect = os.environ.get('MESONINTROSPECT')
-out = subprocess.run([*shlex.split(introspect), '--installed'],
- stdout=subprocess.PIPE, check=True).stdout
+out = subprocess.check_output([*shlex.split(introspect), '--installed'])
for source, dest in json.loads(out).items():
bundle_dest = destdir_join('qemu-bundle', dest)
path = os.path.dirname(bundle_dest)
--
2.41.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] meson: Use subprocess.check_output()
2023-08-12 9:11 [PATCH] meson: Use subprocess.check_output() Akihiko Odaki
@ 2023-08-12 9:51 ` Michael Tokarev
2023-08-23 8:33 ` Thomas Huth
1 sibling, 0 replies; 6+ messages in thread
From: Michael Tokarev @ 2023-08-12 9:51 UTC (permalink / raw)
To: Akihiko Odaki
Cc: qemu-devel, Philippe Mathieu-Daudé, Thomas Huth,
Daniel P . Berrangé, Marc-André Lureau, Paolo Bonzini,
Cleber Rosa, John Snow
12.08.2023 12:11, Akihiko Odaki wrote:
> subprocess.check_output() is a more concise way to execute a subprocess
> here.
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
> Based-on: <20230812061540.5398-1-akihiko.odaki@daynix.com>
> ("[PATCH] meson: Fix MESONINTROSPECT parsing")
>
> scripts/symlink-install-tree.py | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/scripts/symlink-install-tree.py b/scripts/symlink-install-tree.py
> index b72563895c..56d603588f 100644
> --- a/scripts/symlink-install-tree.py
> +++ b/scripts/symlink-install-tree.py
> @@ -15,8 +15,7 @@ def destdir_join(d1: str, d2: str) -> str:
> return str(PurePath(d1, *PurePath(d2).parts[1:]))
>
> introspect = os.environ.get('MESONINTROSPECT')
> -out = subprocess.run([*shlex.split(introspect), '--installed'],
> - stdout=subprocess.PIPE, check=True).stdout
> +out = subprocess.check_output([*shlex.split(introspect), '--installed'])
> for source, dest in json.loads(out).items():
> bundle_dest = destdir_join('qemu-bundle', dest)
> path = os.path.dirname(bundle_dest)
Yes, this works too and is shorter and easier to read.
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Tested-by: Michael Tokarev <mjt@tls.msk.ru>
Thanks!
/mjt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] meson: Use subprocess.check_output()
2023-08-12 9:11 [PATCH] meson: Use subprocess.check_output() Akihiko Odaki
2023-08-12 9:51 ` Michael Tokarev
@ 2023-08-23 8:33 ` Thomas Huth
2023-08-23 8:36 ` Michael Tokarev
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Huth @ 2023-08-23 8:33 UTC (permalink / raw)
To: Akihiko Odaki
Cc: qemu-devel, Philippe Mathieu-Daudé, Daniel P . Berrangé,
Marc-André Lureau, Paolo Bonzini, Cleber Rosa, John Snow,
Michael Tokarev
On 12/08/2023 11.11, Akihiko Odaki wrote:
> subprocess.check_output() is a more concise way to execute a subprocess
> here.
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
> Based-on: <20230812061540.5398-1-akihiko.odaki@daynix.com>
> ("[PATCH] meson: Fix MESONINTROSPECT parsing")
Since that other patch has never been merged, this patch here does not apply
to master ... could you maybe respin it for the plain master branch?
Thomas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] meson: Use subprocess.check_output()
2023-08-23 8:33 ` Thomas Huth
@ 2023-08-23 8:36 ` Michael Tokarev
2023-08-23 8:42 ` Thomas Huth
0 siblings, 1 reply; 6+ messages in thread
From: Michael Tokarev @ 2023-08-23 8:36 UTC (permalink / raw)
To: Thomas Huth, Akihiko Odaki
Cc: qemu-devel, Philippe Mathieu-Daudé, Daniel P . Berrangé,
Marc-André Lureau, Paolo Bonzini, Cleber Rosa, John Snow
23.08.2023 11:33, Thomas Huth wrote:
> On 12/08/2023 11.11, Akihiko Odaki wrote:
>> subprocess.check_output() is a more concise way to execute a subprocess
>> here.
>>
>> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
>> ---
>> Based-on: <20230812061540.5398-1-akihiko.odaki@daynix.com>
>> ("[PATCH] meson: Fix MESONINTROSPECT parsing")
>
> Since that other patch has never been merged, this patch here does not apply to master ... could you maybe respin it for the plain master branch?
Both patches should be applied, that one first, this one second.
I don't think it needs a respin, just a proper patch series.
/mjt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] meson: Use subprocess.check_output()
2023-08-23 8:36 ` Michael Tokarev
@ 2023-08-23 8:42 ` Thomas Huth
2023-08-23 8:45 ` Thomas Huth
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Huth @ 2023-08-23 8:42 UTC (permalink / raw)
To: Michael Tokarev, Akihiko Odaki
Cc: qemu-devel, Philippe Mathieu-Daudé, Daniel P . Berrangé,
Marc-André Lureau, Paolo Bonzini, Cleber Rosa, John Snow
On 23/08/2023 10.36, Michael Tokarev wrote:
> 23.08.2023 11:33, Thomas Huth wrote:
>> On 12/08/2023 11.11, Akihiko Odaki wrote:
>>> subprocess.check_output() is a more concise way to execute a subprocess
>>> here.
>>>
>>> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
>>> ---
>>> Based-on: <20230812061540.5398-1-akihiko.odaki@daynix.com>
>>> ("[PATCH] meson: Fix MESONINTROSPECT parsing")
>>
>> Since that other patch has never been merged, this patch here does not
>> apply to master ... could you maybe respin it for the plain master branch?
>
> Both patches should be applied, that one first, this one second.
> I don't think it needs a respin, just a proper patch series.
Ok, I'll try to pick both patches for my next pull request.
Thomas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] meson: Use subprocess.check_output()
2023-08-23 8:42 ` Thomas Huth
@ 2023-08-23 8:45 ` Thomas Huth
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2023-08-23 8:45 UTC (permalink / raw)
To: Michael Tokarev, Akihiko Odaki
Cc: qemu-devel, Philippe Mathieu-Daudé, Daniel P . Berrangé,
Marc-André Lureau, Paolo Bonzini, Cleber Rosa, John Snow
On 23/08/2023 10.42, Thomas Huth wrote:
> On 23/08/2023 10.36, Michael Tokarev wrote:
>> 23.08.2023 11:33, Thomas Huth wrote:
>>> On 12/08/2023 11.11, Akihiko Odaki wrote:
>>>> subprocess.check_output() is a more concise way to execute a subprocess
>>>> here.
>>>>
>>>> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
>>>> ---
>>>> Based-on: <20230812061540.5398-1-akihiko.odaki@daynix.com>
>>>> ("[PATCH] meson: Fix MESONINTROSPECT parsing")
>>>
>>> Since that other patch has never been merged, this patch here does not
>>> apply to master ... could you maybe respin it for the plain master branch?
>>
>> Both patches should be applied, that one first, this one second.
>> I don't think it needs a respin, just a proper patch series.
>
> Ok, I'll try to pick both patches for my next pull request.
Ah, no, Akihiko said "Please do NOT merge this" on the other patch, so let's
wait 'til the issue with Windows has been resolved first.
Thomas
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-08-23 8:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-12 9:11 [PATCH] meson: Use subprocess.check_output() Akihiko Odaki
2023-08-12 9:51 ` Michael Tokarev
2023-08-23 8:33 ` Thomas Huth
2023-08-23 8:36 ` Michael Tokarev
2023-08-23 8:42 ` Thomas Huth
2023-08-23 8:45 ` Thomas Huth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).