[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] tools/python: fix TypeError for 17903:0728459b3c8d



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1214816541 -3600
# Node ID 81d47e75ce1ab8e9c1f5924773c18d36de29f632
# Parent  c5875621d79a7216d09fe94a8d8c581a9fb3c8c8
tools/python: fix TypeError for 17903:0728459b3c8d

If `hda' is used in domU config file and domain-0 has /dev/hda,
creating a domain failed by TypeError:

  File "//usr/lib/python/xen/xend/server/blkif.py", line 84, in
getDeviceDetails
    (device_path, devid) = blkif.blkdev_name_to_number(dev)
TypeError: unpack non-sequence

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
---
 tools/python/xen/util/blkif.py |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r c5875621d79a -r 81d47e75ce1a tools/python/xen/util/blkif.py
--- a/tools/python/xen/util/blkif.py    Mon Jun 30 10:01:44 2008 +0100
+++ b/tools/python/xen/util/blkif.py    Mon Jun 30 10:02:21 2008 +0100
@@ -20,7 +20,7 @@ def blkdev_name_to_number(name):
     devnum = None
 
     try:
-        return os.stat(n).st_rdev
+        return (devname, os.stat(n).st_rdev)
     except Exception, ex:
         pass
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.