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

[Xen-changelog] [xen-unstable] xend: The method union_update on a set was renamed to update in Python 2.3



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1240231711 -3600
# Node ID cc2267c6d53b3831e160465d4f6959044e094fd1
# Parent  ec9c4b76355b6c420de1fe0ab3e2dfef763f4f0b
xend: The method union_update on a set was renamed to update in Python 2.3

From: Ruben Kerkhof <ruben@xxxxxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/python/xen/xend/XendAPI.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r ec9c4b76355b -r cc2267c6d53b tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Fri Apr 17 17:39:05 2009 +0100
+++ b/tools/python/xen/xend/XendAPI.py  Mon Apr 20 13:48:31 2009 +0100
@@ -125,7 +125,11 @@ def event_register(session, reg_classes)
             }
     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):

_______________________________________________
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®.