Change in vdsm[master]: iscsi.py: fix log message format

zhshzhou at linux.vnet.ibm.com zhshzhou at linux.vnet.ibm.com
Tue Dec 4 10:00:20 UTC 2012


Zhou Zheng Sheng has uploaded a new change for review.

Change subject: iscsi.py: fix log message format
......................................................................

iscsi.py: fix log message format

The logging methods accept the first argument as message, and rest
arguments as format values and options. The original code wrongly splits
a message into several arguments, so only the first part is recognized as
message and the rest are recognized as values.
Since there are no format specifiers in the actually recognized message,
it will raise error when it finds there are format values.

This patch utilizes the implicit string concat feature and fix this bug.

Change-Id: I005f6343f2d8775dbf8406dffe04f6de93a81fce
Signed-off-by: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
---
M vdsm/storage/iscsi.py
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/90/9690/1

diff --git a/vdsm/storage/iscsi.py b/vdsm/storage/iscsi.py
index ac4d7f6..d84187b 100644
--- a/vdsm/storage/iscsi.py
+++ b/vdsm/storage/iscsi.py
@@ -394,9 +394,9 @@
     if (minTimeout > maxTimeout or minTimeout < 0):
         minTimeout = 2
         maxTimeout = 30
-        log.warning("One of the following configuration arguments has an ",
-                    "illegal value: scsi_rescan_minimal_timeout or ",
-                    "scsi_rescan_maximal_timeout. Set to %s and %s seconds ",
+        log.warning("One of the following configuration arguments has an "
+                    "illegal value: scsi_rescan_minimal_timeout or "
+                    "scsi_rescan_maximal_timeout. Set to %s and %s seconds "
                     "respectively.", minTimeout, maxTimeout)
     log.debug("Performing SCSI scan, this will take up to %s seconds",
                 maxTimeout)


--
To view, visit http://gerrit.ovirt.org/9690
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I005f6343f2d8775dbf8406dffe04f6de93a81fce
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list