X-Git-Url: http://git.scottworley.com/paperdoorknob/blobdiff_plain/b25a2f90428a1e7fda03c77fcee8ed0fa3b22555..971e665870ae3d1f38e270e716364dd2ff3dd5a2:/paperdoorknob.py?ds=sidebyside diff --git a/paperdoorknob.py b/paperdoorknob.py index cd93e4e..70f3af5 100644 --- a/paperdoorknob.py +++ b/paperdoorknob.py @@ -20,8 +20,8 @@ def command_line_parser() -> ArgumentParser: def fetch(url: str, timeout: int) -> None: - r = requests.get(url, timeout=timeout) - r.raise_for_status() + with requests.get(url, timeout=timeout) as r: + r.raise_for_status() def main() -> None: