Merge lp:~jelmer/launchpad-buildd/remove-seek_end-constant into lp:launchpad-buildd

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Graham Binns
Approved revision: 45
Merged at revision: 45
Proposed branch: lp:~jelmer/launchpad-buildd/remove-seek_end-constant
Merge into: lp:launchpad-buildd
Diff against target: 45 lines (+5/-8)
2 files modified
debian/changelog (+3/-1)
lpbuildd/slave.py (+2/-7)
To merge this branch: bzr merge lp:~jelmer/launchpad-buildd/remove-seek_end-constant
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Review via email: mp+83771@code.launchpad.net

Description of the change

Remove SEEK_END constant now that all build slaves run at least hardy.

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) :
review: Approve (code)

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-11-29 12:34:41 +0000
3+++ debian/changelog 2011-11-29 12:57:24 +0000
4@@ -2,8 +2,10 @@
5
6 * Use the actual target distroseries name in changelog, rather than
7 the same as the last entry. LP: #855479
8+ * Use os.SEEK_END constant now that all build slaves run at least
9+ hardy. LP: #239213
10
11- -- Jelmer Vernooij <jelmer@ubuntu.com> Tue, 29 Nov 2011 13:34:21 +0100
12+ -- Jelmer Vernooij <jelmer@debian.org> Tue, 29 Nov 2011 13:38:07 +0100
13
14 launchpad-buildd (109) hardy; urgency=low
15
16
17=== modified file 'lpbuildd/slave.py'
18--- lpbuildd/slave.py 2011-11-18 08:32:22 +0000
19+++ lpbuildd/slave.py 2011-11-29 12:57:24 +0000
20@@ -19,11 +19,6 @@
21 from twisted.internet import process
22 from twisted.web import xmlrpc
23
24-# cprov 20080611: in python2.4 posixfile.SEEK_END is deprecated and our
25-# importfascist-check denies its import. When we migrate to python2.5,
26-# we can use os.SEEK_END. See bug #239213.
27-SEEK_END = 2
28-
29 devnull = open("/dev/null", "r")
30
31
32@@ -418,11 +413,11 @@
33 # We rely on good OS practices that keep the file handler
34 # usable once it's opened. So, if open() is ok, a subsequent
35 # seek/tell/read will be safe.
36- rlog.seek(0, SEEK_END)
37+ rlog.seek(0, os.SEEK_END)
38 count = rlog.tell()
39 if count > 2048:
40 count = 2048
41- rlog.seek(-count, SEEK_END)
42+ rlog.seek(-count, os.SEEK_END)
43 ret = rlog.read(count)
44 finally:
45 if rlog is not None:

Subscribers

People subscribed via source and target branches