extras-repoclosure rc-run.py,1.8,1.9

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Sat Jun 24 19:06:00 UTC 2006


Author: mschwendt

Update of /cvs/fedora/extras-repoclosure
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15301

Modified Files:
	rc-run.py 
Log Message:
add the breakfile mechanism to simply interrupt a running job gracefully


Index: rc-run.py
===================================================================
RCS file: /cvs/fedora/extras-repoclosure/rc-run.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- rc-run.py	24 Jun 2006 18:36:15 -0000	1.8
+++ rc-run.py	24 Jun 2006 19:05:57 -0000	1.9
@@ -115,6 +115,9 @@
 cwd = os.getcwd()
 os.chdir(workdir)
 os.umask(0002)  # only for our /srv environment
+fn = os.path.join(workdir,breakfile)
+f = open(fn,'w')
+f.close()
 
 # Delete old log files.
 import glob
@@ -132,12 +135,12 @@
 lockfilename = 'rc-run.lockfile'
 f = open(lockfilename,'w')
 try:
-    print "Trying to acquire lock file:",
+    print "Trying to acquire lock file,\nwaiting for any active job to terminate:",
     sys.stdout.flush()
     rc = fcntl.flock(f, fcntl.LOCK_EX)
     f.write( ('%s' % today) )
     print "OK"
-except IOError (errno, strerr):
+except IOError, (err, strerr):
     print 'ERROR: %s: %s' % (strerr,lockfilename)
     sys.exit(11)
 




More information about the scm-commits mailing list