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 17:49:48 +0000
committerDavid Baker <dbkr@matrix.org>2014-11-20 17:49:48 +0000
commitf1c7f8e8131d6e5531e23e3bc2cd57ab7d1881ae (patch)
treeb1ebd402c0805f475500c9f36a0356322bf26f13 /synapse/app/synctl.py
parentSeparate out the matrix http client completely because just about all of its ... (diff)
parentFix pep8 codestyle warnings (diff)
downloadsynapse-f1c7f8e8131d6e5531e23e3bc2cd57ab7d1881ae.tar.xz
Merge branch 'develop' into http_client_refactor
Diffstat (limited to '')
-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()