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
=== modified file 'debian/changelog'
--- debian/changelog 2011-11-29 12:34:41 +0000
+++ debian/changelog 2011-11-29 12:57:24 +0000
@@ -2,8 +2,10 @@
22
3 * Use the actual target distroseries name in changelog, rather than3 * Use the actual target distroseries name in changelog, rather than
4 the same as the last entry. LP: #8554794 the same as the last entry. LP: #855479
5 * Use os.SEEK_END constant now that all build slaves run at least
6 hardy. LP: #239213
57
6 -- Jelmer Vernooij <jelmer@ubuntu.com> Tue, 29 Nov 2011 13:34:21 +01008 -- Jelmer Vernooij <jelmer@debian.org> Tue, 29 Nov 2011 13:38:07 +0100
79
8launchpad-buildd (109) hardy; urgency=low10launchpad-buildd (109) hardy; urgency=low
911
1012
=== modified file 'lpbuildd/slave.py'
--- lpbuildd/slave.py 2011-11-18 08:32:22 +0000
+++ lpbuildd/slave.py 2011-11-29 12:57:24 +0000
@@ -19,11 +19,6 @@
19from twisted.internet import process19from twisted.internet import process
20from twisted.web import xmlrpc20from twisted.web import xmlrpc
2121
22# cprov 20080611: in python2.4 posixfile.SEEK_END is deprecated and our
23# importfascist-check denies its import. When we migrate to python2.5,
24# we can use os.SEEK_END. See bug #239213.
25SEEK_END = 2
26
27devnull = open("/dev/null", "r")22devnull = open("/dev/null", "r")
2823
2924
@@ -418,11 +413,11 @@
418 # We rely on good OS practices that keep the file handler413 # We rely on good OS practices that keep the file handler
419 # usable once it's opened. So, if open() is ok, a subsequent414 # usable once it's opened. So, if open() is ok, a subsequent
420 # seek/tell/read will be safe.415 # seek/tell/read will be safe.
421 rlog.seek(0, SEEK_END)416 rlog.seek(0, os.SEEK_END)
422 count = rlog.tell()417 count = rlog.tell()
423 if count > 2048:418 if count > 2048:
424 count = 2048419 count = 2048
425 rlog.seek(-count, SEEK_END)420 rlog.seek(-count, os.SEEK_END)
426 ret = rlog.read(count)421 ret = rlog.read(count)
427 finally:422 finally:
428 if rlog is not None:423 if rlog is not None:

Subscribers

People subscribed via source and target branches