Comment 46 for bug 1125622

Revision history for this message
LIU Yulong (dragon889) wrote : Re: ImportError: cannot import name base

Seems this is a python2.7+ syntax:
vip_dict = {v['port_id']: v['name']
                        for v in self.client.list_vips().get('vips', [])}

My envrionment is python 2.6.
I changed the code to
            vip_dict = dict(
                [(obj.port_id, obj.name)
                    for obj in self.client.list_vips().get('vips', [])])
Then the exception was gone.