Skip to content

Commit

Permalink
knowledge.py: Handle missing qt module (#115)
Browse files Browse the repository at this point in the history
* make format

* knowledge.py: Allow PyQt5 to be missing

---------

Co-authored-by: Bane Sullivan <[email protected]>
  • Loading branch information
schwehr and banesullivan authored Sep 24, 2023
1 parent 30da92e commit ddcae67
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scooby/knowledge.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@

def get_pyqt5_version():
"""Return the PyQt5 version."""
from PyQt5.Qt import PYQT_VERSION_STR
try:
from PyQt5.Qt import PYQT_VERSION_STR
except ImportError:
return 'Version unknown'

return PYQT_VERSION_STR

Expand Down

0 comments on commit ddcae67

Please sign in to comment.