aboutsummaryrefslogtreecommitdiffstats
path: root/webmap-download
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2024-06-02 14:10:57 +0200
committerGuilhem Moulin <guilhem@fripost.org>2024-06-02 14:11:13 +0200
commitfe3ac2f1872c5cf544806a97d7ad2b8124b79f67 (patch)
treee93b5264711e5efa6e9742d426ffa49f49554115 /webmap-download
parentf1089608519d4a22cf2d8efd215c5a40eb2f4465 (diff)
webmap-download: Fix check for download duplicates.
dest needs to be stringified before the membership check.
Diffstat (limited to 'webmap-download')
-rwxr-xr-xwebmap-download5
1 files changed, 3 insertions, 2 deletions
diff --git a/webmap-download b/webmap-download
index 997f5fe..68f7b14 100755
--- a/webmap-download
+++ b/webmap-download
@@ -193,7 +193,9 @@ if __name__ == '__main__':
dest = None if cache is None else cache.get('path', None)
if dest is None:
raise Exception('Impossible')
- elif dest in downloads:
+
+ dest = str(dest) # convert from Path()
+ if dest in downloads:
logging.info('%s was already downloaded, skipping', dest)
continue
@@ -201,7 +203,6 @@ if __name__ == '__main__':
user_agent = common.config.get('User-Agent', None)
if user_agent is not None:
headers['User-Agent'] = user_agent
- dest = str(dest) # convert from Path()
try:
# create parent directories