mirror of
https://github.com/Kilian/Trimage.git
synced 2026-01-26 01:58:41 -05:00
Reintroduce missing changes
This commit is contained in:
parent
648f78c139
commit
461ae9fd57
1 changed files with 62 additions and 62 deletions
|
|
@ -8,7 +8,7 @@ ThreadPool Implementation
|
|||
from __future__ import with_statement
|
||||
from threading import Thread, RLock
|
||||
from time import sleep
|
||||
from Queue import Queue, Empty
|
||||
from queue import Queue, Empty
|
||||
import logging
|
||||
import sys
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ class ThreadPool:
|
|||
'''
|
||||
try:
|
||||
return_value = self.callable(*self.arguments) #IGNORE:W0142
|
||||
except Exception, excep: #IGNORE:W0703
|
||||
except Exception as excep: #IGNORE:W0703
|
||||
logger = logging.getLogger("threadpool.worker")
|
||||
logger.warning("A job in the ThreadPool raised an exception: " + excep)
|
||||
#else do nothing cause we don't know what to do...
|
||||
|
|
@ -95,7 +95,7 @@ class ThreadPool:
|
|||
try:
|
||||
if (self.return_callback != None):
|
||||
self.return_callback(return_value)
|
||||
except Exception, _: #IGNORE:W0703 everything could go wrong...
|
||||
except Exception as _: #IGNORE:W0703 everything could go wrong...
|
||||
logger = logging.getLogger('threadpool')
|
||||
logger.warning('Error while delivering return value to callback function')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue