Merge ~andersson123/britney:revert-autopkgtest-content-length-commit into ~ubuntu-release/britney/+git/britney2-ubuntu:master

Proposed by Tim Andersson
Status: Merged
Approved by: Ɓukasz Zemczak
Approved revision: 84d9355125ad3574e63f0fe3a74f7a5a79430fb4
Merged at revision: 84d9355125ad3574e63f0fe3a74f7a5a79430fb4
Proposed branch: ~andersson123/britney:revert-autopkgtest-content-length-commit
Merge into: ~ubuntu-release/britney/+git/britney2-ubuntu:master
Diff against target: 14 lines (+2/-1)
1 file modified
britney2/policies/autopkgtest.py (+2/-1)
Reviewer Review Type Date Requested Status
Ubuntu Release Team Pending
Review via email: mp+464963@code.launchpad.net
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
1diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py
2index 1dd3be4..de7af7b 100644
3--- a/britney2/policies/autopkgtest.py
4+++ b/britney2/policies/autopkgtest.py
5@@ -181,7 +181,8 @@ class AutopkgtestPolicy(BasePolicy):
6 if not data:
7 break
8 f_out.write(data)
9- if http_code and os.path.getsize(new_file) != int(f.getheader('content-length')):
10+ content_length = f.getheader('content-length')
11+ if http_code and content_length and os.path.getsize(new_file) != content_length:
12 self.logger.info('Short read downloading autopkgtest results')
13 os.unlink(new_file)
14 else:

Subscribers

People subscribed via source and target branches