From bb3bac1c3b5daaf54cc6ef2869c75488e48d6e7e Mon Sep 17 00:00:00 2001 From: "\"Dube, Lutz\"" Date: Wed, 11 Aug 2010 13:18:05 +0100 Subject: [PATCH] =?UTF-8?q?Exception=20in=20xen/util/vscsi=5Futil.py=20whi?= =?UTF-8?q?le=20starting=20xend=20=C2=A0=20We=20have=20pscsi=20device=20wi?= =?UTF-8?q?th=20long=20scsi=20ids=20like=2015:0:11:101.=20In=20this=20case?= =?UTF-8?q?=20lsscsi=20prints=20no=20"blank"=20between=20id=20and=20type,?= =?UTF-8?q?=20so=20the=20following=20split=20of=20the=20string=20returns?= =?UTF-8?q?=20wrong=20output.=20The=20field=20physical=5FHCTL=20is=20set?= =?UTF-8?q?=20to=2015:0:11:101]dis.=20The=20patch=20replaces=20char=20"]"?= =?UTF-8?q?=20by=20"]=20",=20so=20split()=20will=20return=20the=20right=20?= =?UTF-8?q?physical=5FHTCL.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com Acked-by: Ian Jackson --- tools/python/xen/util/vscsi_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/python/xen/util/vscsi_util.py b/tools/python/xen/util/vscsi_util.py index 8d5351f4fd..9abf66b84b 100644 --- a/tools/python/xen/util/vscsi_util.py +++ b/tools/python/xen/util/vscsi_util.py @@ -97,7 +97,7 @@ def _vscsi_get_scsidevices_by_lsscsi(option = ""): devices = [] for scsiinfo in os.popen('{ lsscsi -g %s; } 2>/dev/null' % option).readlines(): - s = scsiinfo.split() +        s = scsiinfo.replace(']', '] ').split() hctl = s[0][1:-1] try: devname = s[-2].split('/dev/')[1]