Skip to content

Commit 4f2c35a

Browse files
committed
Changed check_pyqt() to work with qtpy (closes Bitmessage#897)
1 parent ea66812 commit 4f2c35a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/depends.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -385,21 +385,21 @@ def check_pyqt():
385385
Here we are checking for PyQt4 with its version, as for it require
386386
PyQt 4.8 or later.
387387
"""
388-
QtCore = try_import(
389-
'qtpy.QtCore', 'PyBitmessage requires PyQt 4.8 or later and Qt 4.7 or later.')
388+
qtpy = try_import(
389+
'qtpy', 'PyBitmessage requires qtpy, PyQt 4.8 or later and Qt 4.7 or later.')
390390

391-
if not QtCore:
391+
if not qtpy:
392392
return False
393393

394-
logger.info('PyQt Version: %s', QtCore.PYQT_VERSION_STR)
395-
logger.info('Qt Version: %s', QtCore.QT_VERSION_STR)
394+
logger.info('PyQt Version: %s', qtpy.PYQT_VERSION)
395+
logger.info('Qt Version: %s', qtpy.QT_VERSION)
396396
passed = True
397-
if QtCore.PYQT_VERSION < 0x40800:
397+
if qtpy.PYQT_VERSION < '4.8':
398398
logger.error(
399399
'This version of PyQt is too old. PyBitmessage requries'
400400
' PyQt 4.8 or later.')
401401
passed = False
402-
if QtCore.QT_VERSION < 0x40700:
402+
if qtpy.QT_VERSION < '4.7':
403403
logger.error(
404404
'This version of Qt is too old. PyBitmessage requries'
405405
' Qt 4.7 or later.')

0 commit comments

Comments
 (0)