diff options
author | necoro <> | 2007-04-18 18:05:53 +0000 |
---|---|---|
committer | necoro <> | 2007-04-18 18:05:53 +0000 |
commit | 188343e825e9c5bfbc08e4132845371b787fb81e (patch) | |
tree | 8ba43e763a21d3b9f3d742b8b3a1ca5af822ef7f /portato/gui/qt/terminal.py | |
parent | 299ae3c9b6c7356217223b919440e42d50233695 (diff) | |
download | portato-188343e825e9c5bfbc08e4132845371b787fb81e.tar.gz portato-188343e825e9c5bfbc08e4132845371b787fb81e.tar.bz2 portato-188343e825e9c5bfbc08e4132845371b787fb81e.zip |
finished Qt-Frontend
Diffstat (limited to '')
-rw-r--r-- | portato/gui/qt/terminal.py | 12 |
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 |