Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.2, 2.0.3, and 2.0.4

stable annotate: handle incompatibility (sip-4.12.2 and Python <2.5.3)

Thanks to Yuya for suggestion

The symptom was:
TypeError: 'sip.methoddescriptor' object is not callable on
thread2._async_raise(self._threadid, KeyboardInterrupt)

See:
http://www.riverbankcomputing.com/pipermail/pyqt/2011-February/029217.html
http://bugs.python.org/issue4230

Changeset 005719e2552f

Parent 1f16cc87f8a9

by André Sintzoff

Changes to one file · Browse files at 005719e2552f Showing diff from parent 1f16cc87f8a9 Diff from another changeset...

 
304
305
306
 
307
308
309
 
313
314
315
 
 
316
317
318
319
 
320
321
322
 
330
331
332
333
 
334
335
336
 
304
305
306
307
308
309
310
 
314
315
316
317
318
319
320
321
 
322
323
324
325
 
333
334
335
 
336
337
338
339
@@ -304,6 +304,7 @@
  'Background thread for annotating a file at a revision'   def __init__(self, parent=None):   super(_AnnotateThread, self).__init__(parent) + self._threadid = None     @pyqtSlot(object)   def start(self, fctx): @@ -313,10 +314,12 @@
    @pyqtSlot()   def abort(self): + if self._threadid is None: + return   try:   thread2._async_raise(self._threadid, KeyboardInterrupt)   self.wait() - except (AttributeError, ValueError): + except ValueError:   pass     def run(self): @@ -330,7 +333,7 @@
  except KeyboardInterrupt:   pass   finally: - del self._threadid + self._threadid = None   del self._fctx    class AnnotateDialog(QMainWindow):