Merge lp:~sylvain-pineau/checkbox/fix-1511426 into lp:checkbox

Proposed by Sylvain Pineau
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 4070
Merged at revision: 4082
Proposed branch: lp:~sylvain-pineau/checkbox/fix-1511426
Merge into: lp:checkbox
Diff against target: 21 lines (+12/-0)
1 file modified
plainbox/plainbox/impl/result.py (+12/-0)
To merge this branch: bzr merge lp:~sylvain-pineau/checkbox/fix-1511426
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+276179@code.launchpad.net

Description of the change

This MR works around a python3 bug with the gzip module (https://bugs.python.org/issue24301)

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

+1, nice find!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plainbox/plainbox/impl/result.py'
2--- plainbox/plainbox/impl/result.py 2015-08-10 17:51:39 +0000
3+++ plainbox/plainbox/impl/result.py 2015-10-29 20:23:24 +0000
4@@ -486,6 +486,18 @@
5 See: http://bugs.python.org/issue10791
6 """
7
8+ def _read_gzip_header(self):
9+ """
10+ Ignore the non-compressed garbage at the end of the file
11+
12+ See: https://bugs.python.org/issue24301
13+ """
14+
15+ try:
16+ return super()._read_gzip_header()
17+ except OSError:
18+ return False
19+
20 def read1(self, n):
21 return self.read(n)
22

Subscribers

People subscribed via source and target branches