Merge lp://qastaging/~james-w/desktopcouch/report-proc-dir into lp://qastaging/desktopcouch

Proposed by James Westby
Status: Merged
Approved by: Eric Casteleijn
Approved revision: 123
Merged at revision: not available
Proposed branch: lp://qastaging/~james-w/desktopcouch/report-proc-dir
Merge into: lp://qastaging/desktopcouch
Diff against target: 14 lines (+2/-2)
1 file modified
desktopcouch/__init__.py (+2/-2)
To merge this branch: bzr merge lp://qastaging/~james-w/desktopcouch/report-proc-dir
Reviewer Review Type Date Requested Status
Eric Casteleijn (community) Approve
Nicola Larosa (community) Approve
Review via email: mp+20472@code.qastaging.launchpad.net

Commit message

Report the directory we are looking in when we can't find the fds.

It's not always going to be all that useful (e.g. if the process has
ended), but it's going to be more useful than just knowing it was looking
in /proc, and implicitly tells you the pid that it thinks the child should
have.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

Hi,

This was a small change that benefited me when I was
debugging some stuff with desktopcouch, so I propose it
for exclusion.

Just being told that it couldn't find some file descriptors
in /proc isn't that useful, so I just had it print out the
directory that it was rooting the search in, which also
implicitly tells you the pid it thinks the child should have.

Thanks,

James

Revision history for this message
Eric Casteleijn (thisfred) wrote :

This makes sense, but there's a (trivial) conflict which needs to be resolved

review: Needs Fixing
123. By James Westby

Merge trunk.

Revision history for this message
James Westby (james-w) wrote :

Damn, fixed now by merging trunk.

Please review again.

Thanks,

James

Revision history for this message
Nicola Larosa (teknico) wrote :

Looks sensible.

Revision history for this message
Nicola Larosa (teknico) :
review: Approve
Revision history for this message
Eric Casteleijn (thisfred) wrote :

Works now!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'desktopcouch/__init__.py'
2--- desktopcouch/__init__.py 2010-02-24 16:16:19 +0000
3+++ desktopcouch/__init__.py 2010-03-03 15:30:35 +0000
4@@ -80,8 +80,8 @@
5 (dirent_path,))
6 continue
7 except OSError:
8- logging.exception("Unable to find file descriptors in /proc")
9- raise RuntimeError("Unable to find file descriptors in /proc")
10+ logging.exception("Unable to find file descriptors in %s" % proc_dir)
11+ raise RuntimeError("Unable to find file descriptors in %s" % proc_dir)
12
13 # identify socket fds
14 socket_matches = [re.match('socket:\\[([0-9]+)\\]', p) for p in fd_paths]

Subscribers

People subscribed via source and target branches