Merge lp:~gothicx/apport/check_if_exists_ignore into lp:~apport-hackers/apport/trunk

Proposed by Marco Rodrigues
Status: Rejected
Rejected by: Martin Pitt
Proposed branch: lp:~gothicx/apport/check_if_exists_ignore
Merge into: lp:~apport-hackers/apport/trunk
Diff against target: 17 lines (+6/-1)
1 file modified
apport/report.py (+6/-1)
To merge this branch: bzr merge lp:~gothicx/apport/check_if_exists_ignore
Reviewer Review Type Date Requested Status
Martin Pitt (community) Disapprove
Review via email: mp+14669@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Such low-level functions should not silently ignore such errors. This is an UI problem, and I fixed it differently in trunk r1642.

review: Disapprove

Unmerged revisions

1641. By Marco Rodrigues

if ExecutablePath does not exist any more, do nothing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'apport/report.py'
2--- apport/report.py 2009-11-06 12:46:03 +0000
3+++ apport/report.py 2009-11-09 22:25:20 +0000
4@@ -779,7 +779,12 @@
5 assert self.has_key('ExecutablePath')
6
7 dom = self._get_ignore_dom()
8- mtime = str(int(os.stat(self['ExecutablePath']).st_mtime))
9+
10+ try:
11+ mtime = str(int(os.stat(self['ExecutablePath']).st_mtime))
12+ except OSError:
13+ # if it does not exist any more, do nothing
14+ return False
15
16 # search for existing entry and update it
17 for ignore in dom.getElementsByTagName('ignore'):

Subscribers

People subscribed via source and target branches