Fix a bug in function create in kvm_vm
PATCH 1/1 Fix a bug in function create in kvm_vm
--- client/tests/kvm/kvm_vm.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
client/tests/kvm/kvm_vm.py +1 -1
@@ -406,7 +406,7 @@ class VM: self.process.get_output())) return False - logging.debug("VM appears to be alive with PID %d", + logging.debug("VM appears to be alive with PID %d" % self.process.get_pid()) return True
Signature · 1 line
1.6.2.5
Hi Yolkfull! I've checked your patch, but it turns out that the comma is valid syntax for the logging module. By any chance you actually had an error with it?
Quoted 27 lines · Yolkfull Chow
Signed-off-by Yolkfull Chow <[email protected]>---
client/tests/kvm/kvm_vm.py | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)client/tests/kvm/kvm_vm.py +0
-0@@ -406,7 +406,7 @@ class VM: self.process.get_output()))return False
- logging.debug("VM appears to be alive with PID %d",
+ logging.debug("VM appears to be alive with PID %d" %self.process.get_pid()) return True--
1.6.2.5_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
Signature · 1 line
Lucas
Quoted 3 lines · Lucas Meneghel Rodrigues
Hi Yolkfull! I've checked your patch, but it turns out that the comma is valid syntax for the logging module. By any chance you actually had an error with it?
Hi Lucas,
I just checked, yes it's valid syntax for this module. Before this I met a traceback during running autotest and it indicated this line around,thus I doubt about this by mistake. Sorry for confusing. ;-)
But I found for the variables in logging.debug(),sometimes it use comma to format while sometimes '%' which will drop code readability.
Anyway, thanks for checking.
Quoted 38 lines · Yolkfull Chow
Quoted 27 lines
Signed-off-by Yolkfull Chow <[email protected]>---
client/tests/kvm/kvm_vm.py | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)client/tests/kvm/kvm_vm.py +0
-0@@ -406,7 +406,7 @@ class VM: self.process.get_output()))return False
- logging.debug("VM appears to be alive with PID %d",
+ logging.debug("VM appears to be alive with PID %d" %self.process.get_pid()) return True--
1.6.2.5_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotestSignature · 5 lines
Lucas -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Yolkfull Chow
Quoted 3 lines · Lucas Meneghel Rodrigues
Hi Yolkfull! I've checked your patch, but it turns out that the comma is valid syntax for the logging module. By any chance you actually had an error with it?
Quoted 7 lines
Hi Lucas,
I just checked, yes it's valid syntax for this module. Before this I met a traceback during running autotest and it indicated this line around,thus I doubt about this by mistake. Sorry for confusing. ;-)But I found for the variables in logging.debug(),sometimes it use comma to format while sometimes '%' which will drop code readability.
Another reason is if someone who still using kvm_log want to backport codes from this tree, not only need he replace all 'logging' with 'kvm_log' but also need change these comma syntax. ;-)
Quoted 45 lines
Anyway, thanks for checking.
Quoted 21 lines · Yolkfull Chow
Quoted 19 lines
Signed-off-by Yolkfull Chow <[email protected]>---
client/tests/kvm/kvm_vm.py | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)client/tests/kvm/kvm_vm.py +0
-0@@ -406,7 +406,7 @@ class VM: self.process.get_output()))return False
- logging.debug("VM appears to be alive with PID %d",
+ logging.debug("VM appears to be alive with PID %d" %self.process.get_pid()) return TrueQuoted 17 lines
Quoted 8 lines
--
1.6.2.5_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotestSignature · 5 lines
Lucas -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · Yolkfull Chow
Quoted 10 lines · Yolkfull Chow
Quoted 3 lines · Lucas Meneghel Rodrigues
Hi Yolkfull! I've checked your patch, but it turns out that the comma is valid syntax for the logging module. By any chance you actually had an error with it?
Hi Lucas,
I just checked, yes it's valid syntax for this module. Before this I met a traceback during running autotest and it indicated this line around,thus I doubt about this by mistake. Sorry for confusing. ;-)
Quoted 6 lines
Quoted 2 lines
But I found for the variables in logging.debug(),sometimes it use comma to format while sometimes '%' which will drop code readability.
Another reason is if someone who still using
kvm_logwant to backport codes from this tree, not only need he replace all 'logging' with 'kvm_log' but also need change these comma syntax. ;-)
Yes, we prefer using comma on logging statements allways, but sometimes we make mistakes and use the standard string format with %.
When porting code, try to keep in mind that and try to use allways the comma, but don't worry too much about it... just general guidelines :)
Lucas
Quoted 19 lines · Lucas Meneghel Rodrigues
Quoted 11 lines · Yolkfull Chow
Quoted 10 lines · Yolkfull Chow
Quoted 3 lines · Lucas Meneghel Rodrigues
Hi Yolkfull! I've checked your patch, but it turns out that the comma is valid syntax for the logging module. By any chance you actually had an error with it?
Hi Lucas,
I just checked, yes it's valid syntax for this module. Before this I met a traceback during running autotest and it indicated this line around,thus I doubt about this by mistake. Sorry for confusing. ;-)Quoted 6 lines
Quoted 2 lines
But I found for the variables in logging.debug(),sometimes it use comma to format while sometimes '%' which will drop code readability.
Another reason is if someone who still using
kvm_logwant to backport codes from this tree, not only need he replace all 'logging' with 'kvm_log' but also need change these comma syntax. ;-)
Quoted 5 lines
Yes, we prefer using comma on logging statements allways, but sometimes we make mistakes and use the standard string format with %.
When porting code, try to keep in mind that and try to use allways the comma, but don't worry too much about it... just general guidelines :)
Ok, that could be the style. Thanks very much for remind. :)
Cheers,
Quoted 7 lines
Lucas
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html