Added exception printing on Pyro connector, tracking random connection failure...
authorEdouard Tisserant
Thu, 25 Apr 2013 17:04:41 +0900
changeset 1070 86ee833e33ef
parent 1069 880ec628d490
child 1071 5e740fe71fbe
Added exception printing on Pyro connector, tracking random connection failure...
connectors/PYRO/__init__.py
--- a/connectors/PYRO/__init__.py	Thu Apr 25 09:39:03 2013 +0200
+++ b/connectors/PYRO/__init__.py	Thu Apr 25 17:04:41 2013 +0900
@@ -74,7 +74,7 @@
             try:
                 return func(*args,**kwargs)
             except Pyro.errors.ProtocolError, e:
-                pass
+                confnodesroot.logger.write_error("Pyro exception: "+str(e)+"\n")
             except Pyro.errors.ConnectionClosedError, e:
                 confnodesroot.logger.write_error("Connection lost!\n")
                 confnodesroot._connector = None
@@ -84,7 +84,7 @@
                 confnodesroot.logger.write_error(errmess+"\n")
                 print errmess
                 confnodesroot._connector = None
-                return default
+            return default
         return catcher_func
 
     # Check connection is effective.