summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-10-20 23:51:34 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-10-20 23:51:34 +0000
commitdc83c18c35ec01721d4871ba0226f7a20470503c (patch)
tree5c9246da7d9de587e1a8e2289690c91c397885e9 /src
parentdc61d36cf109828ca3a60dfe4b65e44b3162b9b8 (diff)
downloadpoezio-dc83c18c35ec01721d4871ba0226f7a20470503c.tar.gz
poezio-dc83c18c35ec01721d4871ba0226f7a20470503c.tar.bz2
poezio-dc83c18c35ec01721d4871ba0226f7a20470503c.tar.xz
poezio-dc83c18c35ec01721d4871ba0226f7a20470503c.zip
exit a little more cleanly
Diffstat (limited to 'src')
-rw-r--r--src/gui.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui.py b/src/gui.py
index 132bdbc5..bbed0c98 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -73,6 +73,7 @@ class Gui(object):
User interface using ncurses
"""
def __init__(self, xmpp):
+ self.running = True
self.stdscr = curses.initscr()
self.init_curses(self.stdscr)
self.xmpp = xmpp
@@ -542,7 +543,7 @@ class Gui(object):
main loop waiting for the user to press a key
"""
self.refresh_window()
- while True:
+ while self.running:
self.doupdate()
char=read_char(self.stdscr)
# search for keyboard shortcut
@@ -1293,8 +1294,8 @@ class Gui(object):
if isinstance(tab, MucTab):
muc.leave_groupchat(self.xmpp, tab.get_room().name, tab.get_room().own_nick, msg)
self.xmpp.disconnect()
+ self.running = False
self.reset_curses()
- sys.exit()
def do_command(self, key):
if not key: