Skip to content

Commit

Permalink
In filelist, allow for self.files to be pathlib objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Mar 3, 2024
1 parent c489cdc commit f2a85c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion distutils/filelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def exclude_pattern(self, pattern, anchor=1, prefix=None, is_regex=0):
pattern_re = translate_pattern(pattern, anchor, prefix, is_regex)
self.debug_print("exclude_pattern: applying regex r'%s'" % pattern_re.pattern)
for i in range(len(self.files) - 1, -1, -1):
if pattern_re.search(self.files[i]):
if pattern_re.search(str(self.files[i])):
self.debug_print(" removing " + self.files[i])
del self.files[i]
files_found = True
Expand Down

0 comments on commit f2a85c1

Please sign in to comment.