Skip to content

Commit

Permalink
Merge pull request #1942 from python-pillow/pyqt4-pyqt5
Browse files Browse the repository at this point in the history
Fix for program importing PyQt4 when PyQt5 also installed
  • Loading branch information
wiredfool committed Jun 25, 2016
2 parents 07d0539 + 1ab30d0 commit 8d8990a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PIL/ImageQt.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
from PyQt5.QtGui import QImage, qRgba, QPixmap
from PyQt5.QtCore import QBuffer, QIODevice
qt_version = '5'
except ImportError:
except (ImportError, RuntimeError):
try:
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 8d8990a

Please sign in to comment.