summaryrefslogtreecommitdiff
path: root/portato/gui/qt/terminal.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/gui/qt/terminal.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/portato/gui/qt/terminal.py b/portato/gui/qt/terminal.py
index fd01e05..2734aaf 100644
--- a/portato/gui/qt/terminal.py
+++ b/portato/gui/qt/terminal.py
@@ -101,7 +101,7 @@ class QtConsole (Console, Qt.QTextEdit):
def start_new_thread (self):
self.run = True
- self.current = Thread(target=self.__run)
+ self.current = Thread(target=self.__run, name="QtTerminal Listener")
self.current.setDaemon(True) # close application even if this thread is running
self.current.start()
@@ -167,9 +167,13 @@ class QtConsole (Console, Qt.QTextEdit):
format = self.virgin_format()
break
- if attr[s] is not None:
- format.merge(attr[s])
- else:
+ try:
+ if attr[s] is not None:
+ format.merge(attr[s])
+ else:
+ format = self.virgin_format()
+ break
+ except KeyError: # no such attribute
format = self.virgin_format()
break