mirror of
https://github.com/paulscherrerinstitute/sf_daq_broker.git
synced 2026-08-04 16:02:24 +02:00
do not overwrite existing files
This commit is contained in:
committed by
Auf keinen Fall Jens
parent
ce2c5ea601
commit
08960020cf
@@ -383,7 +383,7 @@ def write_code_to_file(name, code, beamline):
|
||||
|
||||
os.makedirs(os.path.dirname(fn), exist_ok=True)
|
||||
|
||||
with open(fn, "w") as f:
|
||||
with open(fn, "x") as f:
|
||||
f.write(code)
|
||||
|
||||
return fn
|
||||
|
||||
Reference in New Issue
Block a user