|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-devel
Re: [Xen-devel] [PATCH] blktap2: Remove set() for Python 2.3
 
Hi,
On <20090723122323.GD12574%yamahata@xxxxxxxxxxxxx>,
 Isaku Yamahata wrote:
> 
> How about creating a file which includes the followings
> and import it?
>  
> +# for 2.3 compatibility
> +try:
> +    set()
> +except NameError:
> +    from sets import Set as set
Good! Xend can start on Python 2.3. Thank you.
Best regards,
-- 
  KUWAMURA Shin'ya
 diff -r bc3aca17cb88 tools/python/xen/util/pci.py
--- a/tools/python/xen/util/pci.py      Thu Jul 23 09:01:30 2009 +0100
+++ b/tools/python/xen/util/pci.py      Fri Jul 24 16:41:22 2009 +0900
@@ -18,6 +18,12 @@ from xen.xend import sxp
 from xen.xend import sxp
 from xen.xend.XendConstants import AUTO_PHP_SLOT
 from xen.xend.XendSXPDev import dev_dict_to_sxp
+
+# for 2.3 compatibility
+try:
+    set()
+except NameError:
+    from sets import Set as set
 
 PROC_PCI_PATH = '/proc/bus/pci/devices'
 PROC_PCI_NUM_RESOURCES = 7
 _______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 
 |   
 
 | 
    | 
  
  
    |   | 
    |