Fix a couple of issues discovered by pylance

This commit is contained in:
Veronica Berglyd Olsen
2022-10-19 12:06:57 +02:00
parent e52f0a9e16
commit caf8a75bbc
3 changed files with 11 additions and 9 deletions
+3 -2
View File
@@ -44,7 +44,8 @@ def logException():
"""Log the content of an exception message.
"""
exType, exValue, _ = sys.exc_info()
logger.error("%s: %s", exType.__name__, str(exValue))
if exType is not None:
logger.error("%s: %s", exType.__name__, str(exValue))
def formatException(exc):
@@ -131,7 +132,7 @@ class NWErrorMessage(QDialog):
try:
import lxml
lxmlVersion = lxml.__version__
lxmlVersion = lxml.__version__ # type: ignore
except Exception:
lxmlVersion = "Unknown"