Skip to content

Commit f59253b

Browse files
bnikolicpicnixz
andauthored
Update Lib/test/test_shutil.py
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent 1513ea3 commit f59253b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Lib/test/test_shutil.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3371,11 +3371,10 @@ def test_exception_on_enodata_call(self):
33713371
# traditional POSIX while preserving the position of where we
33723372
# got to in writing
33733373
def syscall(*args, **kwargs):
3374-
if not flag:
3375-
flag.append(None)
3376-
return orig_syscall(*args, **kwargs)
3377-
else:
3374+
if flag:
33783375
raise OSError(errno.ENODATA, "yo")
3376+
flag.append(None)
3377+
return eval(self.PATCHPOINT)(*args, **kwargs)
33793378

33803379
flag = []
33813380
orig_syscall = eval(self.PATCHPOINT)

0 commit comments

Comments
 (0)