Skip to contentSkip to conversation

Fix a bug in function create in kvm_vm

PATCH In review Yolkfull Chow 2 participants 6 messages Sep 28, 2009 – Oct 12, 2009 KVM

lore
Share & tools
lore
#0 lore raw

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
index 55220f9..8aeffff 100755
@@ -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
#1 lore raw

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

---
 client/tests/kvm/kvm_vm.py |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
client/tests/kvm/kvm_vm.py +0 -0
index 55220f9..8aeffff 100755
@@ -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
#2 lore raw
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

---
 client/tests/kvm/kvm_vm.py |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
client/tests/kvm/kvm_vm.py +0 -0
index 55220f9..8aeffff 100755
@@ -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 · 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
#3 lore raw
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

---
 client/tests/kvm/kvm_vm.py |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
client/tests/kvm/kvm_vm.py +0 -0
index 55220f9..8aeffff 100755
@@ -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

Quoted 17 lines
Quoted 8 lines

--
1.6.2.5

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Signature · 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

#4 lore raw
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_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. ;-)

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

#5 lore raw
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_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 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