Revert "Fix: autopkgtest now returns content-length header again"

This reverts commit b780710623.
less-recipients
Tim Andersson 9 months ago
parent b780710623
commit 84d9355125

@ -181,7 +181,8 @@ class AutopkgtestPolicy(BasePolicy):
if not data:
break
f_out.write(data)
if http_code and os.path.getsize(new_file) != int(f.getheader('content-length')):
content_length = f.getheader('content-length')
if http_code and content_length and os.path.getsize(new_file) != content_length:
self.logger.info('Short read downloading autopkgtest results')
os.unlink(new_file)
else:

Loading…
Cancel
Save