Commit bddb7417 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

GAUDI-1113: readded 'import locker' (where needed) to merge_files.py

parent bf01805b
...@@ -86,7 +86,7 @@ def mergeFiles( fragFileNames, mergedFileName, commentChar, doMerge, ignoreMissi ...@@ -86,7 +86,7 @@ def mergeFiles( fragFileNames, mergedFileName, commentChar, doMerge, ignoreMissi
newFile.writelines(newLines) newFile.writelines(newLines)
newFile.close() newFile.close()
os.rename(mergedFileName + ".new",mergedFileName) os.rename(mergedFileName + ".new",mergedFileName)
finally: finally:
# unlock file # unlock file
fcntl.lockf( lockFile, fcntl.LOCK_UN ) fcntl.lockf( lockFile, fcntl.LOCK_UN )
...@@ -183,6 +183,7 @@ if __name__ == "__main__": ...@@ -183,6 +183,7 @@ if __name__ == "__main__":
logging.basicConfig(level = logging.INFO) logging.basicConfig(level = logging.INFO)
if "GAUDI_BUILD_LOCK" in os.environ: if "GAUDI_BUILD_LOCK" in os.environ:
import locker
globalLock = locker.LockFile(os.environ["GAUDI_BUILD_LOCK"], temporary = True) globalLock = locker.LockFile(os.environ["GAUDI_BUILD_LOCK"], temporary = True)
else: else:
globalLock = None globalLock = None
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment