qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] scripts/kvm/kvm_stat: Fix missing right parantheses and ".format(...)"
@ 2016-02-19  2:20 Fam Zheng
  2016-02-19  7:23 ` Janosch Frank
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Fam Zheng @ 2016-02-19  2:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Jason J. Herne, Janosch Frank

They seem to have snuck in when applying Janosch Frank
<frankja@linux.vnet.ibm.com>'s previous patch.

Signed-off-by: Fam Zheng <famz@redhat.com>

---
v2: Also fix .format. [Janosch]
---
 scripts/kvm/kvm_stat | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
index 3cf1181..769d884 100755
--- a/scripts/kvm/kvm_stat
+++ b/scripts/kvm/kvm_stat
@@ -796,11 +796,12 @@ def check_access(options):
         sys.stderr.write("Please enable CONFIG_TRACING in your kernel "
                          "when using the option -t (default).\n"
                          "If it is enabled, make {0} readable by the "
-                         "current user.\n")
+                         "current user.\n"
+                         .format(PATH_DEBUGFS_TRACING))
         if options.tracepoints:
             sys.exit(1)
 
-        sys.stderr.write("Falling back to debugfs statistics!\n"
+        sys.stderr.write("Falling back to debugfs statistics!\n")
         options.debugfs = True
         sleep(5)
 
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH v2] scripts/kvm/kvm_stat: Fix missing right parantheses and ".format(...)"
  2016-02-19  2:20 [Qemu-devel] [PATCH v2] scripts/kvm/kvm_stat: Fix missing right parantheses and ".format(...)" Fam Zheng
@ 2016-02-19  7:23 ` Janosch Frank
  2016-02-22 17:29 ` Stefan Hajnoczi
  2016-02-22 17:40 ` Paolo Bonzini
  2 siblings, 0 replies; 6+ messages in thread
From: Janosch Frank @ 2016-02-19  7:23 UTC (permalink / raw)
  To: Fam Zheng, qemu-devel; +Cc: Paolo Bonzini, Jason J. Herne, frankja

On 02/19/2016 03:20 AM, Fam Zheng wrote:
> They seem to have snuck in when applying Janosch Frank
> <frankja@linux.vnet.ibm.com>'s previous patch.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> 
> ---
> v2: Also fix .format. [Janosch]
> ---
>  scripts/kvm/kvm_stat | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
> index 3cf1181..769d884 100755
> --- a/scripts/kvm/kvm_stat
> +++ b/scripts/kvm/kvm_stat
> @@ -796,11 +796,12 @@ def check_access(options):
>          sys.stderr.write("Please enable CONFIG_TRACING in your kernel "
>                           "when using the option -t (default).\n"
>                           "If it is enabled, make {0} readable by the "
> -                         "current user.\n")
> +                         "current user.\n"
> +                         .format(PATH_DEBUGFS_TRACING))
>          if options.tracepoints:
>              sys.exit(1)
> 
> -        sys.stderr.write("Falling back to debugfs statistics!\n"
> +        sys.stderr.write("Falling back to debugfs statistics!\n")
>          options.debugfs = True
>          sleep(5)
> 
Reviewed-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Tested-by: Janosch Frank <frankja@linux.vnet.ibm.com>

Thanks

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH v2] scripts/kvm/kvm_stat: Fix missing right parantheses and ".format(...)"
  2016-02-19  2:20 [Qemu-devel] [PATCH v2] scripts/kvm/kvm_stat: Fix missing right parantheses and ".format(...)" Fam Zheng
  2016-02-19  7:23 ` Janosch Frank
@ 2016-02-22 17:29 ` Stefan Hajnoczi
  2016-02-22 17:40   ` Paolo Bonzini
  2016-02-22 17:40 ` Paolo Bonzini
  2 siblings, 1 reply; 6+ messages in thread
From: Stefan Hajnoczi @ 2016-02-22 17:29 UTC (permalink / raw)
  To: Fam Zheng; +Cc: Paolo Bonzini, qemu-devel, Jason J. Herne, Janosch Frank

[-- Attachment #1: Type: text/plain, Size: 1282 bytes --]

On Fri, Feb 19, 2016 at 10:20:16AM +0800, Fam Zheng wrote:
> They seem to have snuck in when applying Janosch Frank
> <frankja@linux.vnet.ibm.com>'s previous patch.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> 
> ---
> v2: Also fix .format. [Janosch]
> ---
>  scripts/kvm/kvm_stat | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
> index 3cf1181..769d884 100755
> --- a/scripts/kvm/kvm_stat
> +++ b/scripts/kvm/kvm_stat
> @@ -796,11 +796,12 @@ def check_access(options):
>          sys.stderr.write("Please enable CONFIG_TRACING in your kernel "
>                           "when using the option -t (default).\n"
>                           "If it is enabled, make {0} readable by the "
> -                         "current user.\n")
> +                         "current user.\n"
> +                         .format(PATH_DEBUGFS_TRACING))

According to ./configure the minimum Python version is 2.4.

str.format() is a Python 2.6+ feature.

Is ./configure wrong (i.e. you are sure that the current crop of stable
Debian, Red Hat, and SLES distros have 2.6+)?  If so, please fix
./configure.

Otherwise please use traditional Python string formatting instead.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH v2] scripts/kvm/kvm_stat: Fix missing right parantheses and ".format(...)"
  2016-02-19  2:20 [Qemu-devel] [PATCH v2] scripts/kvm/kvm_stat: Fix missing right parantheses and ".format(...)" Fam Zheng
  2016-02-19  7:23 ` Janosch Frank
  2016-02-22 17:29 ` Stefan Hajnoczi
@ 2016-02-22 17:40 ` Paolo Bonzini
  2 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2016-02-22 17:40 UTC (permalink / raw)
  To: Fam Zheng, qemu-devel; +Cc: Janosch Frank, Jason J. Herne



On 19/02/2016 03:20, Fam Zheng wrote:
> They seem to have snuck in when applying Janosch Frank
> <frankja@linux.vnet.ibm.com>'s previous patch.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> 
> ---
> v2: Also fix .format. [Janosch]
> ---
>  scripts/kvm/kvm_stat | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
> index 3cf1181..769d884 100755
> --- a/scripts/kvm/kvm_stat
> +++ b/scripts/kvm/kvm_stat
> @@ -796,11 +796,12 @@ def check_access(options):
>          sys.stderr.write("Please enable CONFIG_TRACING in your kernel "
>                           "when using the option -t (default).\n"
>                           "If it is enabled, make {0} readable by the "
> -                         "current user.\n")
> +                         "current user.\n"
> +                         .format(PATH_DEBUGFS_TRACING))
>          if options.tracepoints:
>              sys.exit(1)
>  
> -        sys.stderr.write("Falling back to debugfs statistics!\n"
> +        sys.stderr.write("Falling back to debugfs statistics!\n")
>          options.debugfs = True
>          sleep(5)
>  
> 

Thanks Fam, I'll send a pull request soon.

Paolo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH v2] scripts/kvm/kvm_stat: Fix missing right parantheses and ".format(...)"
  2016-02-22 17:29 ` Stefan Hajnoczi
@ 2016-02-22 17:40   ` Paolo Bonzini
  2016-02-25 11:22     ` Stefan Hajnoczi
  0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2016-02-22 17:40 UTC (permalink / raw)
  To: Stefan Hajnoczi, Fam Zheng; +Cc: Janosch Frank, qemu-devel, Jason J. Herne



On 22/02/2016 18:29, Stefan Hajnoczi wrote:
>>> +                         "current user.\n" +
>>> .format(PATH_DEBUGFS_TRACING))
> According to ./configure the minimum Python version is 2.4.
> 
> str.format() is a Python 2.6+ feature.

This was changed in September 2015:

commit fec21036ff516d20721abc01ae7be99ae5bb0c7b
Author: Markus Armbruster <armbru@redhat.com>
Date:   Fri Sep 4 21:53:03 2015 +0200

    configure: Require Python 2.6

    RHEL-6 and SLES-11 provide Python 2.6.  It'll also work on OS X back
    to 10.6.

    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Message-Id: <1441396383-17304-1-git-send-email-armbru@redhat.com>
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Are you looking at an older version of the configure script?

Paolo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH v2] scripts/kvm/kvm_stat: Fix missing right parantheses and ".format(...)"
  2016-02-22 17:40   ` Paolo Bonzini
@ 2016-02-25 11:22     ` Stefan Hajnoczi
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2016-02-25 11:22 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Janosch Frank, Fam Zheng, qemu-devel, Jason J. Herne

[-- Attachment #1: Type: text/plain, Size: 1047 bytes --]

On Mon, Feb 22, 2016 at 06:40:50PM +0100, Paolo Bonzini wrote:
> 
> 
> On 22/02/2016 18:29, Stefan Hajnoczi wrote:
> >>> +                         "current user.\n" +
> >>> .format(PATH_DEBUGFS_TRACING))
> > According to ./configure the minimum Python version is 2.4.
> > 
> > str.format() is a Python 2.6+ feature.
> 
> This was changed in September 2015:
> 
> commit fec21036ff516d20721abc01ae7be99ae5bb0c7b
> Author: Markus Armbruster <armbru@redhat.com>
> Date:   Fri Sep 4 21:53:03 2015 +0200
> 
>     configure: Require Python 2.6
> 
>     RHEL-6 and SLES-11 provide Python 2.6.  It'll also work on OS X back
>     to 10.6.
> 
>     Signed-off-by: Markus Armbruster <armbru@redhat.com>
>     Message-Id: <1441396383-17304-1-git-send-email-armbru@redhat.com>
>     Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>     Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> Are you looking at an older version of the configure script?

Yes, I must have been.  Thanks for pointing out the change.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-02-25 11:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-19  2:20 [Qemu-devel] [PATCH v2] scripts/kvm/kvm_stat: Fix missing right parantheses and ".format(...)" Fam Zheng
2016-02-19  7:23 ` Janosch Frank
2016-02-22 17:29 ` Stefan Hajnoczi
2016-02-22 17:40   ` Paolo Bonzini
2016-02-25 11:22     ` Stefan Hajnoczi
2016-02-22 17:40 ` Paolo Bonzini

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).