summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-03-24 18:26:13 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-03-24 18:26:13 +0000
commit56ff4b760e0a3f9b6c8d00015bbb4810ddab0db7 (patch)
tree788309324f2a99c12b0603483323a0b8d7103621 /src
parent19d86ea5ea5f135c5ad229add1a0d173ac44d2c9 (diff)
downloadpoezio-56ff4b760e0a3f9b6c8d00015bbb4810ddab0db7.tar.gz
poezio-56ff4b760e0a3f9b6c8d00015bbb4810ddab0db7.tar.bz2
poezio-56ff4b760e0a3f9b6c8d00015bbb4810ddab0db7.tar.xz
poezio-56ff4b760e0a3f9b6c8d00015bbb4810ddab0db7.zip
fixed #1187
Diffstat (limited to 'src')
-rw-r--r--src/gui.py3
-rw-r--r--src/window.py11
2 files changed, 9 insertions, 5 deletions
diff --git a/src/gui.py b/src/gui.py
index 9be69f48..a9c2fa33 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -270,9 +270,6 @@ class Gui(object):
room = self.get_room_by_name(from_room)
if not room:
return
- # if stanza.getType() == 'error':
- # print stanza
- # msg = _("Error: %s") % stanza.getError()
else:
msg = None
affiliation = stanza.getAffiliation()
diff --git a/src/window.py b/src/window.py
index 0df6c7e7..f0ce7aad 100644
--- a/src/window.py
+++ b/src/window.py
@@ -26,8 +26,15 @@ class Win(object):
def _resize(self, height, width, y, x, parent_win):
self.height, self.width, self.x, self.y = height, width, x, y
- self.win = parent_win.subwin(height, width, y, x)
- self.win.leaveok(1)
+ try:
+ self.win = parent_win.subwin(height, width, y, x)
+ self.win.leaveok(1)
+ except:
+ # Happens when the C function subwin fails. The man
+ # doesn't give a reason for this to happen, so I can't
+ # really fix this.
+ # just don't crash when this happens.
+ pass
def refresh(self):
self.win.noutrefresh()