[conduit] Fix crash on close on Python 2.6



commit cdce2398e326d5f3cdf18f9f2b9a4f5550ed77f1
Author: John Stowers <john stowers gmail com>
Date:   Wed Jul 1 09:07:41 2009 +1200

    Fix crash on close on Python 2.6

 conduit/modules/NetworkModule/XMLRPCUtils.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/conduit/modules/NetworkModule/XMLRPCUtils.py b/conduit/modules/NetworkModule/XMLRPCUtils.py
index f0bbd80..7db3adb 100644
--- a/conduit/modules/NetworkModule/XMLRPCUtils.py
+++ b/conduit/modules/NetworkModule/XMLRPCUtils.py
@@ -80,7 +80,13 @@ class StoppableXMLRPCServer(SimpleXMLRPCServer.SimpleXMLRPCServer):
         self.socket.setblocking(0)
         while not self.closed:
             time.sleep(0.15)
-            self.handle_request()        
+            try:
+                self.handle_request()
+            except TypeError:
+                #Python 2.6 throws this on close...
+                pass
+            except:
+                slog.critical("Error handling request", exc_info=True)
             
     def get_request(self):
         inputObjects = []



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]