Changeset a5a8ca7 in mainline
- Timestamp:
- 2009-11-25T14:46:24Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 439d036
- Parents:
- 218e50c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/jobfile.py
r218e50c ra5a8ca7 33 33 import sys 34 34 import os 35 import fcntl 35 36 36 37 def usage(prname): … … 49 50 options = " ".join(sys.argv[4:]) 50 51 51 if (os.path.isfile(jobfname)): 52 jobfile = file(jobfname, "r") 53 records = jobfile.read().split("\n") 54 jobfile.close() 55 else: 56 records = [] 57 58 records.append("{%s},{%s},{%s},{%s}" % (srcfname, objfname, cwd, options)) 59 60 jobfile = file(jobfname, "w") 61 jobfile.write("\n".join(records)) 52 jobfile = file(jobfname, "a") 53 fcntl.lockf(jobfile, fcntl.LOCK_EX) 54 jobfile.write("{%s},{%s},{%s},{%s}\n" % (srcfname, objfname, cwd, options)) 55 fcntl.lockf(jobfile, fcntl.LOCK_UN) 62 56 jobfile.close() 63 57
Note:
See TracChangeset
for help on using the changeset viewer.