From: German Service Network Date: Sat, 4 Oct 2025 06:13:30 +0000 (+0200) Subject: Change urllib3 v2.1.0 deprecated HTTPResponse.getheader() to HTTPResponse.headers... X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60807a7b8f884f3f198f8cc150cdd9fbf019cb36;p=raspbmirror.git Change urllib3 v2.1.0 deprecated HTTPResponse.getheader() to HTTPResponse.headers.get() --- diff --git a/raspbmirror.py b/raspbmirror.py index ced804f..0e5551d 100644 --- a/raspbmirror.py +++ b/raspbmirror.py @@ -185,7 +185,7 @@ def getts(fileurl, response): if fileurl[:7] == b'file://': ts = os.path.getmtime(fileurl[7:]) else: - dt = parsedate_to_datetime(response.getheader('Last-Modified')) + dt = parsedate_to_datetime(response.headers.get('Last-Modified')) if dt.tzinfo is None: dt = dt.replace(tzinfo=timezone.utc) ts = dt.timestamp()