Browse Source

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

tags/v1.35.0rc3
Richard van der Hoff 3 years ago
committed by GitHub
parent
commit
dcbfec919b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions
  1. +1
    -0
      changelog.d/10059.misc
  2. +8
    -4
      synctl

+ 1
- 0
changelog.d/10059.misc View File

@@ -0,0 +1 @@
Improve the error message printed by synctl when synapse fails to start.

+ 8
- 4
synctl View File

@@ -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)
return True
except subprocess.CalledProcessError as e:
write(
"error starting %s(%s) (exit code: %d); see above for logs"
% (app, ",".join(config_files), e.returncode),
colour=RED,
err = "%s(%s) failed to start (exit code: %d). Check the Synapse logfile" % (
app,
",".join(config_files),
e.returncode,
)
if daemonize:
err += ", or run synctl with --no-daemonize"
err += "."
write(err, colour=RED, stream=sys.stderr)
return False




Loading…
Cancel
Save