Skip to content

Commit

Permalink
Catch RuntimeError when importing Qt4
Browse files Browse the repository at this point in the history
In case PySide is already imported
  • Loading branch information
hugovk committed Jun 22, 2016
1 parent 1d47ff5 commit 1ab30d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PIL/ImageQt.py
Expand Up @@ -31,7 +31,7 @@
from PyQt4.QtGui import QImage, qRgba, QPixmap
from PyQt4.QtCore import QBuffer, QIODevice
qt_version = '4'
except ImportError:
except (ImportError, RuntimeError):
try:
from PySide.QtGui import QImage, qRgba, QPixmap
from PySide.QtCore import QBuffer, QIODevice
Expand Down

0 comments on commit 1ab30d0

Please sign in to comment.