WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] The method union_update on a set was renamed to upda

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] The method union_update on a set was renamed to update in Python 2.3
From: Ruben Kerkhof <ruben@xxxxxxxxxxxxxxxx>
Date: Sat, 18 Apr 2009 19:02:43 +0200
Delivery-date: Sat, 18 Apr 2009 10:03:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# 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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] The method union_update on a set was renamed to update in Python 2.3, Ruben Kerkhof <=