]> git.gsnw.org Git - raspbmirror.git/commitdiff
Change urllib3 v2.1.0 deprecated HTTPResponse.getheader() to HTTPResponse.headers... master
authorGerman Service Network <support@gsnw.de>
Sat, 4 Oct 2025 06:13:30 +0000 (08:13 +0200)
committerGerman Service Network <support@gsnw.de>
Sat, 4 Oct 2025 06:13:30 +0000 (08:13 +0200)
raspbmirror.py

index ced804f153ee2c3212383181743d9e83217bb591..0e5551d5aa10c13dc56dfb3ebb181cc07db14c00 100644 (file)
@@ -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()