Yuya Nishihara committed 430651a

bugreport: handle API incompatibility of QScintilla gracefully

On Unix, QSci is installed as a separate package, which is sometimes
incompatible with the installed PyQt core and raises RuntimeError.

In this case, the detail of the RuntimeError should be included in the
report text, so it says the QScintilla version is just "(unknown)".

  • Participants
  • Parent commits 1f1104b
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/

 from PyQt4.QtGui import *
     from PyQt4.Qsci import QSCINTILLA_VERSION_STR
-except (ImportError, AttributeError):
+except (ImportError, AttributeError, RuntimeError):
     # show BugReport dialog even if QScintilla is missing
+    # or incompatible (RuntimeError: the sip module implements API v...)
     QSCINTILLA_VERSION_STR = '(unknown)'
 def _safegetcwd():