MicroPythonWidget: fixed an issue causing eric to crash at startup, if QtSerialPort is not available.

Wed, 21 Aug 2019 14:48:57 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 21 Aug 2019 14:48:57 +0200
changeset 7148
25426353d632
parent 7147
7f30b93eb51d
child 7149
6a9d4a241962

MicroPythonWidget: fixed an issue causing eric to crash at startup, if QtSerialPort is not available.

eric6/MicroPython/MicroPythonWidget.py file | annotate | diff | comparison | revisions
--- a/eric6/MicroPython/MicroPythonWidget.py	Tue Aug 20 19:35:37 2019 +0200
+++ b/eric6/MicroPython/MicroPythonWidget.py	Wed Aug 21 14:48:57 2019 +0200
@@ -215,7 +215,10 @@
         
         self.__fileManagerWidget = None
         
-        self.__interface = MicroPythonCommandsInterface(self)
+        if HAS_QTSERIALPORT:
+            self.__interface = MicroPythonCommandsInterface(self)
+        else:
+            self.__interface = None
         self.__device = None
         self.__connected = False
         self.__setConnected(False)

eric ide

mercurial