diff --git a/qtpy/__init__.py b/qtpy/__init__.py index d5f0e25c..cf22d1e1 100644 --- a/qtpy/__init__.py +++ b/qtpy/__init__.py @@ -119,7 +119,7 @@ class PythonQtError(Exception): API_NAME = {'pyqt5': 'PyQt5', 'pyqt': 'PyQt4', 'pyqt4': 'PyQt4', 'pyside': 'PySide'}[API] -if API in PYQT4_API: +if PYQT4: import sip try: API_NAME += (" (API v{0})".format(sip.getapi('QString')))