From 266085d5871ce18eadb804607190e0398433b83b Mon Sep 17 00:00:00 2001 From: Dan Streetman Date: Fri, 17 Sep 2021 07:25:47 -0400 Subject: [PATCH] misc: fix flake8 complaints --- ubuntutools/misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ubuntutools/misc.py b/ubuntutools/misc.py index b026e87..7ed22cf 100644 --- a/ubuntutools/misc.py +++ b/ubuntutools/misc.py @@ -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)