summary refs log tree commit diff
path: root/synapse/app/synctl.py
diff options
context:
space:
mode:
authorkaiyou <pierre@jaury.eu>2018-04-14 12:27:16 +0200
committerkaiyou <pierre@jaury.eu>2018-04-14 12:27:16 +0200
commit041b41a825e456db180a89a9e4df6ea9f3d01c5b (patch)
treedb669225768b3322fe4d63451fdd05799634599a /synapse/app/synctl.py
parentMerge remote-tracking branch 'upstream/master' into feat-dockerfile (diff)
parentMerge branch 'release-v0.27.0' of https://github.com/matrix-org/synapse (diff)
downloadsynapse-041b41a825e456db180a89a9e4df6ea9f3d01c5b.tar.xz
Merge remote-tracking branch 'upstream/master' into feat-dockerfile
Diffstat (limited to 'synapse/app/synctl.py')
-rwxr-xr-xsynapse/app/synctl.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/app/synctl.py b/synapse/app/synctl.py
index 0f0ddfa78a..712dfa870e 100755
--- a/synapse/app/synctl.py
+++ b/synapse/app/synctl.py
@@ -38,7 +38,7 @@ def pid_running(pid):
     try:
         os.kill(pid, 0)
         return True
-    except OSError, err:
+    except OSError as err:
         if err.errno == errno.EPERM:
             return True
         return False
@@ -98,7 +98,7 @@ def stop(pidfile, app):
         try:
             os.kill(pid, signal.SIGTERM)
             write("stopped %s" % (app,), colour=GREEN)
-        except OSError, err:
+        except OSError as err:
             if err.errno == errno.ESRCH:
                 write("%s not running" % (app,), colour=YELLOW)
             elif err.errno == errno.EPERM:
@@ -252,6 +252,7 @@ def main():
             for running_pid in running_pids:
                 while pid_running(running_pid):
                     time.sleep(0.2)
+            write("All processes exited; now restarting...")
 
     if action == "start" or action == "restart":
         if start_stop_synapse: