diff mbox series

qemu.py: Fix syntax error

Message ID 20170918052524.4045-1-kwolf@redhat.com
State New
Headers show
Series qemu.py: Fix syntax error | expand

Commit Message

Kevin Wolf Sept. 18, 2017, 5:25 a.m. UTC
Python requires parentheses around multiline expression. This fixes the
breakage of all Python-based qemu-iotests cases that was introduced in
commit dab91d9aa0.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---

Eduardo, I think I'm going to include this patch in a block layer pull
request today, just to stop the CI spam I'm getting, so the CC is just
FYI.

 scripts/qemu.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Stefan Hajnoczi Sept. 18, 2017, 9:34 a.m. UTC | #1
On Mon, Sep 18, 2017 at 07:25:24AM +0200, Kevin Wolf wrote:
> Python requires parentheses around multiline expression. This fixes the
> breakage of all Python-based qemu-iotests cases that was introduced in
> commit dab91d9aa0.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> 
> Eduardo, I think I'm going to include this patch in a block layer pull
> request today, just to stop the CI spam I'm getting, so the CC is just
> FYI.
> 
>  scripts/qemu.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Alex Bennée Sept. 18, 2017, 9:40 a.m. UTC | #2
Kevin Wolf <kwolf@redhat.com> writes:

> Python requires parentheses around multiline expression. This fixes the
> breakage of all Python-based qemu-iotests cases that was introduced in
> commit dab91d9aa0.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>

Heh, just sent an identical patch.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>
> Eduardo, I think I'm going to include this patch in a block layer pull
> request today, just to stop the CI spam I'm getting, so the CC is just
> FYI.
>
>  scripts/qemu.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/qemu.py b/scripts/qemu.py
> index 8c67595ec8..5e02dd8e78 100644
> --- a/scripts/qemu.py
> +++ b/scripts/qemu.py
> @@ -193,8 +193,8 @@ class QEMUMachine(object):
>          qemulog = open(self._qemu_log_path, 'wb')
>          try:
>              self._pre_launch()
> -            self._qemu_full_args = self._wrapper + [self._binary] +
> -                                    self._base_args() + self._args
> +            self._qemu_full_args = (self._wrapper + [self._binary] +
> +                                    self._base_args() + self._args)
>              self._popen = subprocess.Popen(self._qemu_full_args,
>                                             stdin=devnull,
>                                             stdout=qemulog,


--
Alex Bennée
Peter Maydell Sept. 18, 2017, 10:32 a.m. UTC | #3
On 18 September 2017 at 06:25, Kevin Wolf <kwolf@redhat.com> wrote:
> Python requires parentheses around multiline expression. This fixes the
> breakage of all Python-based qemu-iotests cases that was introduced in
> commit dab91d9aa0.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>
> Eduardo, I think I'm going to include this patch in a block layer pull
> request today, just to stop the CI spam I'm getting, so the CC is just
> FYI.

Applied to master as a buildfix; thanks.

-- PMM
Eduardo Habkost Sept. 18, 2017, 11:49 a.m. UTC | #4
On Mon, Sep 18, 2017 at 07:25:24AM +0200, Kevin Wolf wrote:
> Python requires parentheses around multiline expression. This fixes the
> breakage of all Python-based qemu-iotests cases that was introduced in
> commit dab91d9aa0.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> 
> Eduardo, I think I'm going to include this patch in a block layer pull
> request today, just to stop the CI spam I'm getting, so the CC is just
> FYI.

No problem, thanks for fixing it.  I incorrectly assumed "make
check" was covering that code path.  Sorry for the mess.


> 
>  scripts/qemu.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/qemu.py b/scripts/qemu.py
> index 8c67595ec8..5e02dd8e78 100644
> --- a/scripts/qemu.py
> +++ b/scripts/qemu.py
> @@ -193,8 +193,8 @@ class QEMUMachine(object):
>          qemulog = open(self._qemu_log_path, 'wb')
>          try:
>              self._pre_launch()
> -            self._qemu_full_args = self._wrapper + [self._binary] +
> -                                    self._base_args() + self._args
> +            self._qemu_full_args = (self._wrapper + [self._binary] +
> +                                    self._base_args() + self._args)
>              self._popen = subprocess.Popen(self._qemu_full_args,
>                                             stdin=devnull,
>                                             stdout=qemulog,
> -- 
> 2.13.5
>
diff mbox series

Patch

diff --git a/scripts/qemu.py b/scripts/qemu.py
index 8c67595ec8..5e02dd8e78 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -193,8 +193,8 @@  class QEMUMachine(object):
         qemulog = open(self._qemu_log_path, 'wb')
         try:
             self._pre_launch()
-            self._qemu_full_args = self._wrapper + [self._binary] +
-                                    self._base_args() + self._args
+            self._qemu_full_args = (self._wrapper + [self._binary] +
+                                    self._base_args() + self._args)
             self._popen = subprocess.Popen(self._qemu_full_args,
                                            stdin=devnull,
                                            stdout=qemulog,