Fix crash on race condition in CLI guest token manager resets

Fixes #414
This commit is contained in:
JustAnotherArchivist
2022-02-26 19:31:08 +00:00
parent 77bbb9f61f
commit 2480b173f4

View File

@@ -287,7 +287,11 @@ class _CLIGuestTokenManager(GuestTokenManager):
def reset(self):
super().reset()
with self._lock:
os.remove(self._file)
try:
os.remove(self._file)
except FileNotFoundError:
# Another process likely already removed the file
pass
class _TwitterAPIType(enum.Enum):