summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()