Skip to content

Commit 0caa8c9

Browse files
committed
client: Avoid double-cleanup exception
in python <3.13 it raises FileNotFoundError, but python 3.13 seems to raise OSError exception instead when trying to unlock non-existing file. Signed-off-by: Lukáš Doktor <[email protected]>
1 parent f9fd707 commit 0caa8c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aexpect/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def close(self, sig=signal.SIGKILL):
473473
try:
474474
unlock_fd(lock)
475475
os.unlink(self._close_lockfile)
476-
except FileNotFoundError:
476+
except (FileNotFoundError, OSError):
477477
# File already removed by other thread
478478
pass
479479

0 commit comments

Comments
 (0)