mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Avoid runtime errors during shutdown of CLI plugins that use check_css
This commit is contained in:
parent
1d35b78601
commit
fe61a72b83
@ -222,7 +222,12 @@ class Pool(object):
|
|||||||
self.working = False
|
self.working = False
|
||||||
|
|
||||||
def shutdown(self):
|
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 = []
|
self.workers = []
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user