Browse files

Catch IOError on windows with -gthread.

Closes gh-50, thanks to Pieter Cristiaan de Groot and others on the
list for the fix.
  • Loading branch information...
1 parent 6bc709a commit 8a8ad680f67a30c83cd4240f94cab3a2f504242e @fperez fperez committed Mar 12, 2011
Showing with 7 additions and 5 deletions.
  1. +7 −5 IPython/Shell.py
View
12 IPython/Shell.py
@@ -844,11 +844,13 @@ def on_timer(self):
"""Called when GTK is idle.
Must return True always, otherwise GTK stops calling it"""
-
- update_tk(self.tk)
- self.IP.runcode()
- time.sleep(0.01)
- return True
+ try:
+ update_tk(self.tk)
+ self.IP.runcode()
+ time.sleep(0.01)
+ return True
+ except IOError:
+ return True
class IPShellWX(IPThread):

0 comments on commit 8a8ad68

Please sign in to comment.