From fe3ac2f1872c5cf544806a97d7ad2b8124b79f67 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 2 Jun 2024 14:10:57 +0200 Subject: webmap-download: Fix check for download duplicates. dest needs to be stringified before the membership check. --- webmap-download | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'webmap-download') 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 -- cgit v1.2.3