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

[Xen-devel] [PATCH] The method union_update on a set was renamed to update in Python 2.3



# HG changeset patch
# User Ruben Kerkhof <ruben@xxxxxxxxxxxxxxxx>
# Date 1240073704 -7200
# Node ID 818a59a91d5b75246a448fdd6b6de6542e159b75
# Parent  655dc3bc1d8ee15465f9ce14a1dc23f1f01c639a
The method union_update on a set was renamed to update in Python 2.3

diff -r 655dc3bc1d8e -r 818a59a91d5b tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Thu Apr 16 11:54:06 2009 +0100
+++ b/tools/python/xen/xend/XendAPI.py  Sat Apr 18 18:55:04 2009 +0200
@@ -125,7 +125,11 @@
             }
     if not reg_classes:
         reg_classes = classes
-    event_registrations[session]['classes'].union_update(reg_classes)
+    if hasattr(set, 'union_update'):
+        event_registrations[session]['classes'].union_update(reg_classes)
+    else:
+        event_registrations[session]['classes'].update(reg_classes)
+


 def event_unregister(session, unreg_classes):

Attachment: XendAPI-union-update.patch
Description: Binary data

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

 


Rackspace

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