# HG changeset patch # User Edouard Tisserant # Date 1544437363 -3600 # Node ID e8760be772d50ca569fcd410404ac956b23e6959 # Parent 046303391deae658fd360bdd36ad062dacd0fb60 Make easier to read console error message in case of connection problem. diff -r 046303391dea -r e8760be772d5 ProjectController.py --- a/ProjectController.py Wed Dec 05 14:05:35 2018 +0100 +++ b/ProjectController.py Mon Dec 10 11:22:43 2018 +0100 @@ -1777,10 +1777,10 @@ # Get connector from uri try: self._SetConnector(connectors.ConnectorFactory(uri, self)) - except Exception: + except Exception as e: self.logger.write_error( - _("Exception while connecting %s!\n") % uri) - self.logger.write_error(traceback.format_exc()) + _("Exception while connecting to '%s': %s\n") % (uri, str(e))) + #self.logger.write_error(traceback.format_exc()) # Did connection success ? if self._connector is None: diff -r 046303391dea -r e8760be772d5 connectors/__init__.py --- a/connectors/__init__.py Wed Dec 05 14:05:35 2018 +0100 +++ b/connectors/__init__.py Mon Dec 10 11:22:43 2018 +0100 @@ -86,6 +86,9 @@ # first call to import the module, # then call with parameters to create the class connector_specific_class = connectors[scheme]()(uri, confnodesroot) + + if connector_specific_class is None: + return None # new class inheriting from generic and specific connector base classes return ClassType(_scheme + "_connector",