Avoid runtime errors during shutdown of CLI plugins that use check_css

This commit is contained in:
Kovid Goyal 2020-02-16 18:20:06 +05:30
parent 1d35b78601
commit fe61a72b83
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -222,7 +222,12 @@ class Pool(object):
self.working = False
def shutdown(self):
tuple(map(sip.delete, self.workers))
def safe_delete(x):
if not sip.isdeleted(x):
sip.delete(x)
tuple(map(safe_delete, self.workers))
self.workers = []