scripts/kvm/kvm_stat: Fix missing right parantheses and ".format(...)"
PATCH v2 1/1 scripts/kvm/kvm_stat: Fix missing right parantheses and ".format(...)"
They seem to have snuck in when applying Janosch Frank <[email protected]>'s previous patch.
---
v2: Also fix .format. [Janosch]
--- scripts/kvm/kvm_stat | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
scripts/kvm/kvm_stat +3 -2
@@ -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)
Signature · 1 line
2.4.3
Quoted 20 lines · Fam Zheng
They seem to have snuck in when applying Janosch Frank <[email protected]>'s previous patch.
Signed-off-by Fam Zheng <[email protected]>---
v2: Also fix .format. [Janosch]--- scripts/kvm/kvm_stat | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)scripts/kvm/kvm_stat +0
-1@@ -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")
scripts/kvm/kvm_stat def check_access(options): · line 807
Quoted 10 lines
scripts/kvm/kvm_stat +3
-1+ "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
Quoted 16 lines · Fam Zheng
They seem to have snuck in when applying Janosch Frank <[email protected]>'s previous patch.
Signed-off-by Fam Zheng <[email protected]>---
v2: Also fix .format. [Janosch]--- scripts/kvm/kvm_stat | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)scripts/kvm/kvm_stat +0
-0
scripts/kvm/kvm_stat def check_access(options): · line 800
Quoted 6 lines
scripts/kvm/kvm_stat +2
-1@@ -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
Paolo Bonzini
Reviewed-by Peter MaydellQuoted 5 lines · Stefan Hajnoczi
Quoted 2 lines
Quoted 2 lines
+ "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 <[email protected]> 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.
Message-Id: <[email protected]>
Are you looking at an older version of the configure script?
Paolo
Quoted 20 lines · Paolo Bonzini
Quoted 5 lines · Stefan Hajnoczi
Quoted 2 lines
Quoted 2 lines
+ "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
fec21036ff516d20721abc01ae7be99ae5bb0c7bAuthor: Markus Armbruster <[email protected]> Date: Fri Sep 4 21:53:03 2015 +0200configure: Require Python 2.6
RHEL-6 and SLES-11 provide Python 2.6. It'll also work on OS X back to 10.6.
Quoted 6 lines
Signed-off-by Markus Armbruster <[email protected]>Message-Id: <[email protected]>
Reviewed-by Peter Maydell <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>Are you looking at an older version of the configure script?
Yes, I must have been. Thanks for pointing out the change.
Stefan
Quoted 21 lines · Fam Zheng
They seem to have snuck in when applying Janosch Frank <[email protected]>'s previous patch.
Signed-off-by Fam Zheng <[email protected]>---
v2: Also fix .format. [Janosch]--- scripts/kvm/kvm_stat | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)scripts/kvm/kvm_stat +0
-1@@ -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")
scripts/kvm/kvm_stat def check_access(options): · line 807
Quoted 10 lines
scripts/kvm/kvm_stat +3
-1+ "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