Merge lp:~gary-lasker/software-center/fix-crash-lp960742 into lp:software-center

Proposed by Gary Lasker
Status: Merged
Merged at revision: 2909
Proposed branch: lp:~gary-lasker/software-center/fix-crash-lp960742
Merge into: lp:software-center
Diff against target: 16 lines (+5/-1)
1 file modified
utils/ (+5/-1)
To merge this branch: bzr merge lp:~gary-lasker/software-center/fix-crash-lp960742
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email:

Description of the change

Proposed fix for crasher bug 960742. Please see the bug report for details and the stacktrace.


To post a comment you must log in.
Michael Vogt (mvo) wrote :

Thanks, looks good. I guess this is caused by a race condition when multiple expunge-cache processes run, but that should be fine, i.e. I don't think we need locking here.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'utils/'
--- utils/ 2012-03-15 10:43:13 +0000
+++ utils/ 2012-03-22 01:33:30 +0000
@@ -25,7 +25,11 @@
25 print "Would delete: %s" % f25 print "Would delete: %s" % f
26 else:26 else:
27 logging.debug("Deleting: %s" % f)27 logging.debug("Deleting: %s" % f)
28 os.unlink(f)28 try:
29 os.unlink(f)
30 except OSError as e:
31 logging.warn("When expunging the cache, could not unlink "
32 "file '%s' (%s)'" % (f, e))
30 def clean(self):34 def clean(self):
31 # go over the directories35 # go over the directories


People subscribed via source and target branches