From 188343e825e9c5bfbc08e4132845371b787fb81e Mon Sep 17 00:00:00 2001 From: necoro <> Date: Wed, 18 Apr 2007 18:05:53 +0000 Subject: finished Qt-Frontend --- portato/gui/qt/terminal.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'portato/gui/qt/terminal.py') 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 -- cgit v1.2.3-54-g00ecf