connectors/PYRO/__init__.py
changeset 1826 91796f408540
parent 1783 3311eea28d56
child 1830 e598d1acf354
equal deleted inserted replaced
1825:bcb50e736a46 1826:91796f408540
    20 #
    20 #
    21 # You should have received a copy of the GNU General Public License
    21 # You should have received a copy of the GNU General Public License
    22 # along with this program; if not, write to the Free Software
    22 # along with this program; if not, write to the Free Software
    23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    24 
    24 
       
    25 
       
    26 from __future__ import print_function
    25 import Pyro
    27 import Pyro
    26 import Pyro.core
    28 import Pyro.core
    27 import Pyro.util
    29 import Pyro.util
    28 from Pyro.errors import PyroError
    30 from Pyro.errors import PyroError
    29 import traceback
    31 import traceback
   121                 confnodesroot.logger.write_error(_("Pyro exception: %s\n") % e)
   123                 confnodesroot.logger.write_error(_("Pyro exception: %s\n") % e)
   122             except Exception, e:
   124             except Exception, e:
   123                 # confnodesroot.logger.write_error(traceback.format_exc())
   125                 # confnodesroot.logger.write_error(traceback.format_exc())
   124                 errmess = ''.join(Pyro.util.getPyroTraceback(e))
   126                 errmess = ''.join(Pyro.util.getPyroTraceback(e))
   125                 confnodesroot.logger.write_error(errmess + "\n")
   127                 confnodesroot.logger.write_error(errmess + "\n")
   126                 print errmess
   128                 print(errmess)
   127                 confnodesroot._SetConnector(None)
   129                 confnodesroot._SetConnector(None)
   128             return default
   130             return default
   129         return catcher_func
   131         return catcher_func
   130 
   132 
   131     # Check connection is effective.
   133     # Check connection is effective.