fix crash when using 'skip=false' and archive (fixes #1023)

Separating the archive check from pathfmt.exists() in b5243297
had some unintended side effects.

It is also not possible to monkey-patch a dunder method like
__contains__ because of the special method lookup that gets
performed for them.
This commit is contained in:
Mike Fährmann
2020-09-23 15:00:27 +02:00
parent aeb0d32333
commit d5fa716d89
2 changed files with 20 additions and 16 deletions

View File

@@ -941,7 +941,7 @@ class DownloadArchive():
"archive-format", extractor.archive_fmt)
).format_map
def __contains__(self, kwdict):
def check(self, kwdict):
"""Return True if the item described by 'kwdict' exists in archive"""
key = kwdict["_archive_key"] = self.keygen(kwdict)
self.cursor.execute(