def graphics_listen_addrs(migrate_data):
 listen_addrs = None
 if (migrate_data.obj_attr_is_set('graphics_listen_addr_vnc') or migrate_data.obj_attr_is_set('graphics_listen_addr_spice')):
  listen_addrs = {'vnc': None, 'spice': None}
 if migrate_data.obj_attr_is_set('graphics_listen_addr_vnc'):
  listen_addrs['vnc'] = str(migrate_data.graphics_listen_addr_vnc)
 if migrate_data.obj_attr_is_set('graphics_listen_addr_spice'):
  listen_addrs['spice'] = str(migrate_data.graphics_listen_addr_spice)
 return listen_addrs

def graphics_listen_addrs ( migrate_data ) : listen_addrs = None if ( migrate_data . obj_attr_is_set ( 'graphics_listen_addr_vnc' ) or migrate_data . obj_attr_is_set ( 'graphics_listen_addr_spice' ) ) : listen_addrs = { 'vnc' : None , 'spice' : None } if migrate_data . obj_attr_is_set ( 'graphics_listen_addr_vnc' ) : listen_addrs [ 'vnc' ] = str ( migrate_data . graphics_listen_addr_vnc ) if migrate_data . obj_attr_is_set ( 'graphics_listen_addr_spice' ) : listen_addrs [ 'spice' ] = str ( migrate_data . graphics_listen_addr_spice ) return listen_addrs
returns listen addresses of vnc/spice from a libvirtlivemigratedata .