[Kimchi-devel] [PATCH] Issue #290: correct the log usage
shaohef at linux.vnet.ibm.com
shaohef at linux.vnet.ibm.com
Thu Dec 19 05:21:34 UTC 2013
From: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
It is recommended that the log message should use comma.
Arguments should be separated by comma.
and they should not be in a tuple.
Before this patch:
Kimchi throws an exception as follow:
TypeError: not enough arguments for format string
Logged from file disks.py, line 117
After use the log correctly:
Kimchi log works well:
Error getting partition info for 35000c5002eaa8392p2: Error executing
lsblk: lsblk: dm-2: unknown device name
Signed-off-by: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
---
src/kimchi/disks.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/kimchi/disks.py b/src/kimchi/disks.py
index 991bb4a..a054961 100644
--- a/src/kimchi/disks.py
+++ b/src/kimchi/disks.py
@@ -114,7 +114,7 @@ def get_partition_details(name):
dev = _get_lsblk_devs(keys, [dev_path])[0]
except OperationFailed as e:
kimchi_log.error(
- "Error getting partition info for %s: %s", (name, e))
+ "Error getting partition info for %s: %s", name, e)
return {}
if dev['mountpoint']:
--
1.7.11.7
More information about the Kimchi-devel
mailing list