Merge lp:~barry/checkbox/enoent into lp:checkbox

Proposed by Barry Warsaw
Status: Merged
Merged at revision: 942
Proposed branch: lp:~barry/checkbox/enoent
Merge into: lp:checkbox
Diff against target: 39 lines (+13/-1)
2 files modified
debian/changelog (+7/-0)
setup.py (+6/-1)
To merge this branch: bzr merge lp:~barry/checkbox/enoent
Reviewer Review Type Date Requested Status
Ara Pulido Pending
Review via email: mp+66598@code.launchpad.net

Description of the change

Catch and ignore ENOENT, which can happen when `python setup.py clean -a` is
called on a fresh checkout.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-06-29 16:01:36 +0000
3+++ debian/changelog 2011-07-01 13:18:26 +0000
4@@ -1,3 +1,10 @@
5+checkbox (0.12.4) oneiric; urgency=low
6+
7+ * Fix checkbox_clean.run() to ignore missing executables, as is the case
8+ in a fresh checkout.
9+
10+ -- Barry Warsaw <barry@ubuntu.com> Fri, 01 Jul 2011 14:14:24 +0100
11+
12 checkbox (0.12.3) oneiric; urgency=low
13
14 * Only reading CHECKBOX_* environment variables in config (LP: #802458)
15
16=== modified file 'setup.py'
17--- setup.py 2011-06-29 13:34:45 +0000
18+++ setup.py 2011-07-01 13:18:26 +0000
19@@ -2,6 +2,7 @@
20
21 import os
22 import re
23+import errno
24 import posixpath
25 from glob import glob
26
27@@ -106,7 +107,11 @@
28 super(checkbox_clean, self).run()
29
30 for executable in self.executables:
31- os.unlink(executable)
32+ try:
33+ os.unlink(executable)
34+ except OSError, error:
35+ if error.errno != errno.ENOENT:
36+ raise
37
38
39 # Hack to workaround unsupported option in Python << 2.5

Subscribers

People subscribed via source and target branches