Merge lp:~didrocks/unity/fix-bug-682314 into lp:unity

Proposed by Didier Roche-Tolomelli
Status: Merged
Approved by: Neil J. Patel
Approved revision: no longer in the source branch.
Merged at revision: 637
Proposed branch: lp:~didrocks/unity/fix-bug-682314
Merge into: lp:unity
Diff against target: 17 lines (+5/-1)
1 file modified
tools/migrate_favorites.py (+5/-1)
To merge this branch: bzr merge lp:~didrocks/unity/fix-bug-682314
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Approve
Review via email: mp+42102@code.launchpad.net

Description of the change

Fix bug #682314, only do migration if we have the right tools for it

To post a comment you must log in.
Revision history for this message
Neil J. Patel (njpatel) wrote :

Looks good, approved.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tools/migrate_favorites.py'
--- tools/migrate_favorites.py 2010-11-24 18:13:44 +0000
+++ tools/migrate_favorites.py 2010-11-29 12:50:52 +0000
@@ -60,8 +60,12 @@
6060
61 return apps_list61 return apps_list
6262
63try:
64 migration_level = subprocess.Popen(["gsettings", "get", "com.canonical.Unity.Launcher", "favorite-migration"], stdout=subprocess.PIPE).communicate()[0].strip()[1:-1]
65except OSError, e:
66 print "Gsettings not executable or not installed, postponing migration. The error was: %s" % e
67 sys.exit(1)
6368
64migration_level = subprocess.Popen(["gsettings", "get", "com.canonical.Unity.Launcher", "favorite-migration"], stdout=subprocess.PIPE).communicate()[0].strip()[1:-1]
65if migration_level >= LAST_MIGRATION:69if migration_level >= LAST_MIGRATION:
66 print "Migration already done"70 print "Migration already done"
67 sys.exit(0)71 sys.exit(0)