summary refs log tree commit diff
path: root/synapse/app/synctl.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2014-11-20 18:17:46 +0000
committerDavid Baker <dbkr@matrix.org>2014-11-20 18:17:46 +0000
commit23465a30b65808a75afa5cb98bcd1131a2a2c984 (patch)
treedcd987034fefbb2649da8346bf36c9d9ded25acc /synapse/app/synctl.py
parentMerge branch 'http_client_refactor' into pushers (diff)
parentFix pep8 codestyle warnings (diff)
downloadsynapse-23465a30b65808a75afa5cb98bcd1131a2a2c984.tar.xz
Merge branch 'develop' into pushers
Diffstat (limited to 'synapse/app/synctl.py')
-rwxr-xr-xsynapse/app/synctl.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/synapse/app/synctl.py b/synapse/app/synctl.py
index abe055a64c..52a0b729f4 100755
--- a/synapse/app/synctl.py
+++ b/synapse/app/synctl.py
@@ -21,11 +21,12 @@ import signal
 
 SYNAPSE = ["python", "-m", "synapse.app.homeserver"]
 
-CONFIGFILE="homeserver.yaml"
-PIDFILE="homeserver.pid"
+CONFIGFILE = "homeserver.yaml"
+PIDFILE = "homeserver.pid"
+
+GREEN = "\x1b[1;32m"
+NORMAL = "\x1b[m"
 
-GREEN="\x1b[1;32m"
-NORMAL="\x1b[m"
 
 def start():
     if not os.path.exists(CONFIGFILE):
@@ -43,12 +44,14 @@ def start():
     subprocess.check_call(args)
     print GREEN + "started" + NORMAL
 
+
 def stop():
     if os.path.exists(PIDFILE):
         pid = int(open(PIDFILE).read())
         os.kill(pid, signal.SIGTERM)
         print GREEN + "stopped" + NORMAL
 
+
 def main():
     action = sys.argv[1] if sys.argv[1:] else "usage"
     if action == "start":
@@ -62,5 +65,6 @@ def main():
         sys.stderr.write("Usage: %s [start|stop|restart]\n" % (sys.argv[0],))
         sys.exit(1)
 
-if __name__=='__main__':
+
+if __name__ == "__main__":
     main()