Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Issue 7715013: Update upload.py from rietveld @ 7696eca367d2. (Closed)

Created:
9 years, 4 months ago by M-A Ruel
Modified:
9 years, 4 months ago
Reviewers:
Dirk Pranke
CC:
chromium-reviews
Visibility:
Public.

Description

Update upload.py from rietveld @ 7696eca367d2. --- Trap failure to get password from keyring It happens when using upload.py from a ssh session without a X session but gnomekeyring is used. R=dpranke@chromium.org BUG= TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=97909

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -1 line) Patch
M third_party/upload.py View 1 chunk +8 lines, -1 line 2 comments Download

Messages

Total messages: 7 (0 generated)
M-A Ruel
9 years, 4 months ago (2011-08-23 20:09:54 UTC) #1
Dirk Pranke
http://codereview.chromium.org/7715013/diff/1/third_party/upload.py File third_party/upload.py (right): http://codereview.chromium.org/7715013/diff/1/third_party/upload.py#newcode625 third_party/upload.py:625: # gnomekeyring.IOError inherits from object. :/ I don't get ...
9 years, 4 months ago (2011-08-23 20:13:27 UTC) #2
M-A Ruel
http://codereview.chromium.org/7715013/diff/1/third_party/upload.py File third_party/upload.py (right): http://codereview.chromium.org/7715013/diff/1/third_party/upload.py#newcode625 third_party/upload.py:625: # gnomekeyring.IOError inherits from object. :/ On 2011/08/23 20:13:27, ...
9 years, 4 months ago (2011-08-23 20:14:36 UTC) #3
Dirk Pranke
On Tue, Aug 23, 2011 at 1:14 PM, <maruel@chromium.org> wrote: > > http://codereview.chromium.org/7715013/diff/1/third_party/upload.py > File ...
9 years, 4 months ago (2011-08-23 20:17:13 UTC) #4
Dirk Pranke
On Tue, Aug 23, 2011 at 1:14 PM, <maruel@chromium.org> wrote: > > http://codereview.chromium.org/7715013/diff/1/third_party/upload.py > File ...
9 years, 4 months ago (2011-08-23 20:17:50 UTC) #5
M-A Ruel
On 2011/08/23 20:17:13, Dirk Pranke wrote: > > No, that the keyring module is a ...
9 years, 4 months ago (2011-08-23 20:19:49 UTC) #6
Dirk Pranke
9 years, 4 months ago (2011-08-23 20:23:23 UTC) #7
On 2011/08/23 20:19:49, Marc-Antoine Ruel wrote:
> On 2011/08/23 20:17:13, Dirk Pranke wrote:
> > > No, that the keyring module is a leaky abstraction. Depending if you get
> > > the gnome keyring or the macosx keychain, the exception will be
> > > different without any common base class.
> > >
> > 
> > Can't you catch the two exceptions in different except blocks? Or in
> > an if statement using the values returned from sys.exc_info() as I
> > suggested?
> 
> From a quick search, there's an awful lot of different exceptions that can be
> thrown and it's a bit messy to survey as the implementation is in a .so.
> 
> No need to use sys.exc_info() per se, trapping object would probably work. I
> just have nothing to do with the exception.
> 
> I could import gnomekeyring and check gnomekeyring.IOError but that wouldn't
> improve anything here.

Okay, if it's not easy to figure out which exceptions might legitimately be
thrown, that's fine.

I'm just not usually very comfortable with a blanket catch like this, but this
seems fairly low risk.

LGTM.

Powered by Google App Engine
This is Rietveld 408576698