Skip to content
Snippets Groups Projects
Unverified Commit dcbfec91 authored by Richard van der Hoff's avatar Richard van der Hoff Committed by GitHub
Browse files

Improve the error message printed by synctl when synapse fails to start. (#10059)

parent 5447a763
Branches
Tags
No related merge requests found
Improve the error message printed by synctl when synapse fails to start.
...@@ -97,11 +97,15 @@ def start(pidfile: str, app: str, config_files: Iterable[str], daemonize: bool) ...@@ -97,11 +97,15 @@ def start(pidfile: str, app: str, config_files: Iterable[str], daemonize: bool)
write("started %s(%s)" % (app, ",".join(config_files)), colour=GREEN) write("started %s(%s)" % (app, ",".join(config_files)), colour=GREEN)
return True return True
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
write( err = "%s(%s) failed to start (exit code: %d). Check the Synapse logfile" % (
"error starting %s(%s) (exit code: %d); see above for logs" app,
% (app, ",".join(config_files), e.returncode), ",".join(config_files),
colour=RED, e.returncode,
) )
if daemonize:
err += ", or run synctl with --no-daemonize"
err += "."
write(err, colour=RED, stream=sys.stderr)
return False return False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment