mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-16 09:31:08 +00:00
misc: fix flake8 complaints
This commit is contained in:
parent
6ca12331d6
commit
266085d587
@ -334,11 +334,11 @@ def download(src, dst, size=0):
|
||||
fsrc.raise_for_status()
|
||||
_download(fsrc, fdst, size)
|
||||
except requests.exceptions.HTTPError as e:
|
||||
if e.response != None and e.response.status_code == 404:
|
||||
if e.response is not None and e.response.status_code == 404:
|
||||
raise NotFoundError(f'URL {src} not found: {e}')
|
||||
raise DownloadError(e)
|
||||
except requests.exceptions.ConnectionError as e:
|
||||
# This is most likely a archive hostname that doesn't resolve, like 'ftpmaster.internal'
|
||||
# This is likely a archive hostname that doesn't resolve, like 'ftpmaster.internal'
|
||||
raise NotFoundError(f'URL {src} not found: {e}')
|
||||
except requests.exceptions.RequestException as e:
|
||||
raise DownloadError(e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user