diff options
| author | Didier Roche <didier.roche@canonical.com> | 2011-03-07 11:28:07 +0100 |
|---|---|---|
| committer | Didier Roche <didier.roche@canonical.com> | 2011-03-07 11:28:07 +0100 |
| commit | c3c6509e6c0c510c9676da1f93eb2ef88cbed10f (patch) | |
| tree | 256ad3746be6d9e523213d91fa0a0105bf146e72 /tools | |
| parent | 19f3951cd6511c20f6048d00e677d6ce4bd2bc4d (diff) | |
ignore invalid gconf keys (LP: #722403)
Fixes LP: #722403 (bzr r918.2.2)
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/migrate_favorites.py | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/tools/migrate_favorites.py b/tools/migrate_favorites.py index 141436665..8b9d1450e 100755 --- a/tools/migrate_favorites.py +++ b/tools/migrate_favorites.py @@ -190,8 +190,12 @@ if migration_level < '3.2.0': for candidate in lucid_favorites_list: candidate_path = '/apps/netbook-launcher/favorites/%s' % candidate if (candidate and client.get_string('%s/type' % candidate_path) == 'application'): - launcher_location = client.get_string('%s/desktop_file' % candidate_path) - if launcher_location: + try: + launcher_location = client.get_string('%s/desktop_file' % candidate_path) + except GError, e: + log("Dont migrate %s: %s" % (candidate_path, e), log_file) + continue + if launcher_location: apps_list = register_new_app(launcher_location, apps_list, log_file) # get GNOME panel favorites and convert them @@ -200,13 +204,17 @@ if migration_level < '3.2.0': migrating_chapter_log("gnome-panel items", apps_list, candidate_objects, log_file) for candidate in candidate_objects: candidate_path = '/apps/panel/objects/%s' % candidate - if (candidate and client.get_string('%s/object_type' % candidate_path) == 'launcher-object' - and client.get_string('%s/toplevel_id' % candidate_path) in panel_list): - launcher_location = client.get_string('%s/launcher_location' % candidate_path) - if launcher_location: - if not launcher_location.startswith('/'): - launcher_location = os.path.expanduser('~/.gnome2/panel2.d/default/launchers/%s' % launcher_location) - apps_list = register_new_app(launcher_location, apps_list, log_file) + try: + if (candidate and client.get_string('%s/object_type' % candidate_path) == 'launcher-object' + and client.get_string('%s/toplevel_id' % candidate_path) in panel_list): + launcher_location = client.get_string('%s/launcher_location' % candidate_path) + if launcher_location: + if not launcher_location.startswith('/'): + launcher_location = os.path.expanduser('~/.gnome2/panel2.d/default/launchers/%s' % launcher_location) + apps_list = register_new_app(launcher_location, apps_list, log_file) + except GError, e: + log("Dont migrate %s: %s" % (candidate_path, e), log_file) + continue # get GNOME desktop launchers desktop_dir = get_desktop_dir() |
