ia64/xen-unstable

changeset 19559:cc2267c6d53b

xend: The method union_update on a set was renamed to update in Python 2.3

From: Ruben Kerkhof <ruben@rubenkerkhof.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Apr 20 13:48:31 2009 +0100 (2009-04-20)
parents ec9c4b76355b
children 423a7f500059
files tools/python/xen/xend/XendAPI.py
line diff
     1.1 --- a/tools/python/xen/xend/XendAPI.py	Fri Apr 17 17:39:05 2009 +0100
     1.2 +++ b/tools/python/xen/xend/XendAPI.py	Mon Apr 20 13:48:31 2009 +0100
     1.3 @@ -125,7 +125,11 @@ def event_register(session, reg_classes)
     1.4              }
     1.5      if not reg_classes:
     1.6          reg_classes = classes
     1.7 -    event_registrations[session]['classes'].union_update(reg_classes)
     1.8 +    if hasattr(set, 'union_update'):
     1.9 +        event_registrations[session]['classes'].union_update(reg_classes)
    1.10 +    else:
    1.11 +        event_registrations[session]['classes'].update(reg_classes)
    1.12 +
    1.13  
    1.14  
    1.15  def event_unregister(session, unreg_classes):