mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Remove pathlib function added in Python 3.9
This commit is contained in:
parent
da9f8b2b9d
commit
ebb81d9f03
@ -82,10 +82,12 @@ class FolderCategory(ValueListCategory):
|
|||||||
|
|
||||||
def sort_key(self, dupe, crit_value):
|
def sort_key(self, dupe, crit_value):
|
||||||
value = self.extract_value(dupe)
|
value = self.extract_value(dupe)
|
||||||
if value.is_relative_to(crit_value):
|
# This is instead of using is_relative_to() which was added in py 3.9
|
||||||
return 0
|
try:
|
||||||
else:
|
value.relative_to(crit_value)
|
||||||
|
except ValueError:
|
||||||
return 1
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
class FilenameCategory(CriterionCategory):
|
class FilenameCategory(CriterionCategory):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user