extras-buildsys/utils/pushscript ToStable.py,1.1,1.2
Michael Schwendt (mschwendt)
fedora-extras-commits at redhat.com
Thu Aug 23 12:56:44 UTC 2007
Author: mschwendt
Update of /cvs/fedora/extras-buildsys/utils/pushscript
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12650
Modified Files:
ToStable.py
Log Message:
also check the pushscript lock here
Index: ToStable.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/pushscript/ToStable.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ToStable.py 23 Aug 2007 12:12:41 -0000 1.1
+++ ToStable.py 23 Aug 2007 12:56:41 -0000 1.2
@@ -124,6 +124,16 @@
Utils.signer_gid_check(cfg.signersgid)
os.umask(cfg.signersumask)
-
+
+ if not os.path.exists(cfg.rundir):
+ os.makedirs(cfg.rundir)
+ lockfile = os.path.join(cfg.rundir,'pushscript.lock')
+ lock = LockFile(lockfile)
+ try:
+ lock.lock()
+ except LockFileLocked:
+ print 'Script locked via %s\nIt seems to be in use already.' % lockfile
+ sys.exit(errno.EPERM)
+
main(cfg,sys.argv[2],sys.argv[3:])
sys.exit(0)
More information about the fedora-extras-commits
mailing list