mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 14:24:18 -04:00
Use syntax that works on both py2.7 and py3
This commit is contained in:
parent
80916e6884
commit
239badea9b
8 changed files with 10 additions and 10 deletions
|
@ -29,13 +29,13 @@ NORMAL = "\x1b[m"
|
|||
|
||||
|
||||
def start(configfile):
|
||||
print "Starting ...",
|
||||
print ("Starting ...")
|
||||
args = SYNAPSE
|
||||
args.extend(["--daemonize", "-c", configfile])
|
||||
|
||||
try:
|
||||
subprocess.check_call(args)
|
||||
print GREEN + "started" + NORMAL
|
||||
print (GREEN + "started" + NORMAL)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print (
|
||||
RED +
|
||||
|
@ -48,7 +48,7 @@ def stop(pidfile):
|
|||
if os.path.exists(pidfile):
|
||||
pid = int(open(pidfile).read())
|
||||
os.kill(pid, signal.SIGTERM)
|
||||
print GREEN + "stopped" + NORMAL
|
||||
print (GREEN + "stopped" + NORMAL)
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue