]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/_core.py
Compilation fix. I didn't add a #error since I figured this sample will be
[wxWidgets.git] / wxPython / src / gtk / _core.py
index ceb9755a86e57222d73812c342e95ceb92f5d69c..6d9ccebf8795565089b1dedaf671b60f9496fa8b 100644 (file)
@@ -5691,11 +5691,9 @@ your Mac."""
         self._BootstrapApp()
 
 
-    def __del__(self):
-        try:
-            self.RestoreStdio()  # Just in case the MainLoop was overridden
-        finally:
-            wx.PyApp.__del__(self)
+    def __del__(self, destroy=wx.PyApp.__del__):
+        self.RestoreStdio()  # Just in case the MainLoop was overridden
+        destroy(self)
 
     def Destroy(self):
         wx.PyApp.Destroy(self)
@@ -5724,7 +5722,10 @@ your Mac."""
 
 
     def RestoreStdio(self):
-        _sys.stdout, _sys.stderr = self.saveStdio
+        try:
+            _sys.stdout, _sys.stderr = self.saveStdio
+        except:
+            pass
 
 
     def SetOutputWindowAttributes(self, title=None, pos=None, size=None):