- create_env_directory_at_node(node)
- except RuntimeError as exc:
- logger.console(
- f"Node {node[u'type']} host {node[u'host']}, port {node[u'port']} "
- f"setup failed, error: {exc!r}"
- )
+ stdout, stderr = create_env_directory_at_node(node)
+ if isinstance(logs, list):
+ logs.append(f"{node[u'host']} Env stdout: {stdout}")
+ logs.append(f"{node[u'host']} Env stderr: {stderr}")
+ except Exception:
+ # any exception must result in result = False
+ # since this runs in a thread and can't be caught anywhere else
+ err_msg = f"Node {node[u'type']} host {node[u'host']}, " \
+ f"port {node[u'port']} setup failed."
+ logger.console(err_msg)
+ if isinstance(logs, list):
+ logs.append(f"{err_msg} Exception: {traceback.format_exc()}")