mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 06:33:42 +02:00
Avoid runtime errors during shutdown of CLI plugins that use check_css
This commit is contained in:
parent
1d35b78601
commit
fe61a72b83
1 changed files with 6 additions and 1 deletions
|
|
@ -222,7 +222,12 @@ def work_done(self, worker, result):
|
|||
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 = []
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue