Skip to content

Commit 5c3e146

Browse files
Apply review suggestions
Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent 3d66a90 commit 5c3e146

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Lib/test/test_tarfile.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4829,7 +4829,7 @@ def testing_filter(member, path):
48294829
@symlink_test
48304830
def test_extract_filters_target_none(self):
48314831
# Test that when extract() falls back to extracting (rather than
4832-
# linking) a hardlink target, the member is rejected if the filter
4832+
# linking) a hardlink target, the member is skipped if the filter
48334833
# returns None.
48344834
with ArchiveMaker() as arc:
48354835
arc.add('a/b/s', symlink_to='../escape')
@@ -4839,7 +4839,6 @@ def filter_unsafe_members(member, path):
48394839
return tarfile.data_filter(member, path)
48404840
except tarfile.FilterError as error:
48414841
return None
4842-
tempdir = pathlib.Path(TEMPDIR) / 'extract'
48434842
with self.check_context(arc.open(), filter_unsafe_members):
48444843
if os_helper.can_symlink():
48454844
self.expect_file('a/b/s', symlink_to='../escape')

0 commit comments

Comments
 (0)