Merge lp://qastaging/~laney/unity-scope-gdrive/handle-accounts-manager-fail into lp://qastaging/unity-scope-gdrive

Proposed by Iain Lane
Status: Merged
Approved by: Alberto Mardegan
Approved revision: 27
Merged at revision: 23
Proposed branch: lp://qastaging/~laney/unity-scope-gdrive/handle-accounts-manager-fail
Merge into: lp://qastaging/unity-scope-gdrive
Diff against target: 33 lines (+6/-3)
1 file modified
unity-scope-gdocs (+6/-3)
To merge this branch: bzr merge lp://qastaging/~laney/unity-scope-gdrive/handle-accounts-manager-fail
Reviewer Review Type Date Requested Status
Alberto Mardegan (community) Approve
Review via email: mp+129216@code.qastaging.launchpad.net

Description of the change

Fixing the #7 issue on errors.u.c, a crash in the gdocs scope when the accounts database can't be read for whatever reason.

I'm not sure if 'return'ing is right here; you'll have to let me know.

To post a comment you must log in.
26. By Iain Lane

Fix indentation and whitespace

Revision history for this message
Alberto Mardegan (mardy) wrote :

Hi Iain, and thanks for the patch! It works fine, but (also answering your question) if you just return from the constructor, the lens process will still use system resources (though not being actively running).

I'd rather change that to "sys.exit(0)"; please also have a look at this IRC log:

================
10:44 < mardy> mhr3: or maybe my real question is this: I have a scope which sometimes fails initialization (if the home dir is read-only), and in that case I
               know that it won't return any results, at least during this session
10:44 < mhr3> mardy, there's no way to tell that the lens
10:44 < mardy> mhr3: is it better if I exit the scope process, or just keep it running idle?
10:45 < mardy> mhr3: or is there an API to tell the lens "forget about me, I'm useless" before exiting?
10:45 < mhr3> if you exit the lens will try to restart it
10:45 < mardy> mhr3: OK, then maybe it's better not to exit
10:45 < mhr3> if you keep exiting, it'll give up
10:45 < mardy> ah
10:47 < mhr3> looking at the code, it'll try to restart the scope 2 seconds after it exits
10:48 < mhr3> if it exits more than 10times, it gives up
10:48 < mardy> mhr3: OK. Not sure which alternative is better -- maybe keep it running as idle?
10:50 < mhr3> mardy, is there a chance it'll be usable after some time?
10:50 < mardy> mhr3: no, not during the current user session
10:50 < mhr3> then i'd say keep exiting
10:51 < mardy> mhr3: OK, thanks!
================

review: Needs Fixing
Revision history for this message
Iain Lane (laney) wrote :

Updated. Thanks for checking!

Revision history for this message
Alberto Mardegan (mardy) wrote :

Looks good, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches