diff py/tempserver.py @ 230:185621f47040

run 2to3
author Matt Johnston <matt@ucc.asn.au>
date Fri, 10 Apr 2015 23:59:16 +0800
parents 99255c501e02
children e39ed85d87a5
line wrap: on
line diff
--- a/py/tempserver.py	Fri Apr 10 23:55:07 2015 +0800
+++ b/py/tempserver.py	Fri Apr 10 23:59:16 2015 +0800
@@ -129,13 +129,13 @@
         if do_hup:
             try:
                 os.kill(pid, signal.SIGHUP)
-                print>>sys.stderr, "Sent SIGHUP to process %d" % pid
+                print("Sent SIGHUP to process %d" % pid, file=sys.stderr)
                 sys.exit(0)
             except OSError:
-                print>>sys.stderr, "Process %d isn't running?" % pid
+                print("Process %d isn't running?" % pid, file=sys.stderr)
                 sys.exit(1)
 
-        print>>sys.stderr, "Locked by PID %d" % pid
+        print("Locked by PID %d" % pid, file=sys.stderr)
     
         stale = False
         if pid > 0:
@@ -146,7 +146,7 @@
                     stale = True
 
                 if not stale:
-                    print>>sys.stderr, "Stopping old tempserver pid %d" % pid
+                    print("Stopping old tempserver pid %d" % pid, file=sys.stderr)
                     os.kill(pid, signal.SIGTERM)
                     time.sleep(2)
                     pidf.acquire(0)
@@ -161,11 +161,11 @@
 
         if stale:
             # isn't still running, steal the lock
-            print>>sys.stderr, "Unlinking stale lockfile %s for pid %d" % (pidpath, pid)
+            print("Unlinking stale lockfile %s for pid %d" % (pidpath, pid), file=sys.stderr)
             pidf.break_lock()
 
     if do_hup:
-        print>>sys.stderr, "Doesn't seem to be running"
+        print("Doesn't seem to be running", file=sys.stderr)
         sys.exit(1)
 
     if '--daemon' in sys.argv: