326 def __init__(self, *args, **kwargs): |
326 def __init__(self, *args, **kwargs): |
327 # Overwrite the provided run method with our own, to |
327 # Overwrite the provided run method with our own, to |
328 # intercept the thread creation by threading.Thread |
328 # intercept the thread creation by threading.Thread |
329 self.run = lambda s=self, run=self.run: _bootstrap(s, run) |
329 self.run = lambda s=self, run=self.run: _bootstrap(s, run) |
330 |
330 |
331 super(ThreadWrapper, self).__init__(*args, **kwargs) |
331 module.Thread.__init__(self, *args, **kwargs) |
332 |
332 |
333 module.Thread = ThreadWrapper |
333 module.Thread = ThreadWrapper |
334 |
334 |
335 # Add hook for *.QThread |
335 # Add hook for *.QThread |
336 elif (fullname in ['PyQt4.QtCore', 'PyQt5.QtCore', |
336 elif (fullname in ['PyQt4.QtCore', 'PyQt5.QtCore', |