Skip to content

Commit

Permalink
Changed check_pyqt() to work with qtpy (closes Bitmessage#897)
Browse files Browse the repository at this point in the history
  • Loading branch information
g1itch committed Nov 5, 2018
1 parent 2f87e52 commit fb2f5e0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/depends.py
Expand Up @@ -385,21 +385,21 @@ def check_pyqt():
Here we are checking for PyQt4 with its version, as for it require
PyQt 4.8 or later.
"""
QtCore = try_import(
'qtpy.QtCore', 'PyBitmessage requires PyQt 4.8 or later and Qt 4.7 or later.')
qtpy = try_import(
'qtpy', 'PyBitmessage requires qtpy, PyQt 4.8 or later and Qt 4.7 or later.')

if not QtCore:
if not qtpy:
return False

logger.info('PyQt Version: %s', QtCore.PYQT_VERSION_STR)
logger.info('Qt Version: %s', QtCore.QT_VERSION_STR)
logger.info('PyQt Version: %s', qtpy.PYQT_VERSION)
logger.info('Qt Version: %s', qtpy.QT_VERSION)
passed = True
if QtCore.PYQT_VERSION < 0x40800:
if qtpy.PYQT_VERSION < '4.8':
logger.error(
'This version of PyQt is too old. PyBitmessage requries'
' PyQt 4.8 or later.')
passed = False
if QtCore.QT_VERSION < 0x40700:
if qtpy.QT_VERSION < '4.7':
logger.error(
'This version of Qt is too old. PyBitmessage requries'
' Qt 4.7 or later.')
Expand Down

0 comments on commit fb2f5e0

Please sign in to comment.