summary refs log tree commit diff
path: root/synapse/app/synctl.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-04-04 10:45:22 +0100
committerGitHub <noreply@github.com>2018-04-04 10:45:22 +0100
commit725a72ec5a6b9fb8dd6e46c63566086923c12029 (patch)
treeaba825f9077fd1d945d7f5b3381e9d54cb5203b5 /synapse/app/synctl.py
parentMerge pull request #3044 from matrix-org/michaelk/performance_stats (diff)
parentreplace old style error catching with 'as' keyword (diff)
downloadsynapse-725a72ec5a6b9fb8dd6e46c63566086923c12029.tar.xz
Merge pull request #3000 from NotAFile/change-except-style
Replace old style error catching with 'as' keyword
Diffstat (limited to 'synapse/app/synctl.py')
-rwxr-xr-xsynapse/app/synctl.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/app/synctl.py b/synapse/app/synctl.py
index 0f0ddfa78a..b0e1b5e66a 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: