Catch RuntimeError when importing Qt4

In case PySide is already imported
This commit is contained in:
Hugo 2016-06-22 11:25:59 +03:00 committed by GitHub
parent 1d47ff5f4d
commit 1ab30d0ba5

View File

@ -31,7 +31,7 @@ except (ImportError, RuntimeError):
from PyQt4.QtGui import QImage, qRgba, QPixmap from PyQt4.QtGui import QImage, qRgba, QPixmap
from PyQt4.QtCore import QBuffer, QIODevice from PyQt4.QtCore import QBuffer, QIODevice
qt_version = '4' qt_version = '4'
except ImportError: except (ImportError, RuntimeError):
try: try:
from PySide.QtGui import QImage, qRgba, QPixmap from PySide.QtGui import QImage, qRgba, QPixmap
from PySide.QtCore import QBuffer, QIODevice from PySide.QtCore import QBuffer, QIODevice