misc/migration/3.16.0_Any.py
author Nicolas Chauvat <nicolas.chauvat@logilab.fr>
Thu, 14 Feb 2013 16:01:24 +0100
changeset 8696 0bb18407c053
parent 8675 b60329e40e26
permissions -rw-r--r--
[toward py3k] rewrite dict.keys() and dict.values() (part of #2711624) Python 3K will only expose iterators. http://docs.python.org/3.0/whatsnew/3.0.html#views-and-iterators-instead-of-lists

sync_schema_props_perms('EmailAddress')

for source in rql('CWSource X WHERE X type "pyrorql"').entities():
    sconfig = source.dictconfig
    nsid = sconfig.pop('pyro-ns-id', config.appid)
    nshost = sconfig.pop('pyro-ns-host', '')
    nsgroup = sconfig.pop('pyro-ns-group', ':cubicweb')
    if nsgroup:
        nsgroup += '.'
    source.cw_set(url=u'pyro://%s/%s%s' % (nshost, nsgroup, nsid))
    source.update_config(skip_unknown=True, **sconfig)

commit()