Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 262523 Details for
Bug 352218
Gnome 2.32 upgrade guide
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
fix-addressbook.py
fix-addressbook.py (text/plain), 1.37 KB, created by
Gilles Dartiguelongue (RETIRED)
on 2011-02-14 20:18:19 UTC
(
hide
)
Description:
fix-addressbook.py
Filename:
MIME Type:
Creator:
Gilles Dartiguelongue (RETIRED)
Created:
2011-02-14 20:18:19 UTC
Size:
1.37 KB
patch
obsolete
>#!/usr/bin/python2 > >import os >from xml.etree import ElementTree >from pprint import pprint > >import gconf > >def main(): > """ Fix evolution addressbook bad migration from 2.30 to 2.32. """ > > client = gconf.Client() > > system_addressbook = [] > gconf_keys = client.get_list('/apps/evolution/addressbook/sources', 'string') > > for gindex, gitem in enumerate(gconf_keys): > xmlblob = ElementTree.fromstring(gitem) > > # Only work on local files > if xmlblob.get('base_uri') != 'local:': > continue > > sources = xmlblob.findall('source') > for source in sources: > reluri = source.get('relative_uri') > > if reluri == 'system': > system_addressbook.append((len(sources), gindex)) > > # Drop deprecated uri attribute from source tags > if source.get('uri'): > print "Removing deprecated attribute from source %d [%s]" % (gindex, source.get('name')) > del source.attrib['uri'] > continue > > # Preserve original format > new_value = '<?xml version="1.0"?>\n' + ElementTree.tostring(xmlblob) + '\n' > gconf_keys[gindex] = new_value > > if len(system_addressbook) > 1: > system_addressbook.sort() > system_addressbook.reverse() > for count, gindex in system_addressbook[1:]: > print "Deleting addressbook source", gindex, "which was in a group of", count, "items." > del gconf_keys[gindex] > > client.set_list('/apps/evolution/addressbook/sources', 'string', gconf_keys) > > >if __name__ == '__main__': > main() >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 352218
: 262523