mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
Catch RuntimeError when importing Qt4
In case PySide is already imported
This commit is contained in:
parent
1d47ff5f4d
commit
1ab30d0ba5
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user