From 8ad877af9b02d22fab9e2a02483fcdc9dcc80b99 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Thu, 7 Apr 2022 14:03:44 +0200 Subject: [PATCH] Make swash output read-only --- swash/processing/swash.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/swash/processing/swash.py b/swash/processing/swash.py index c47aadb..13c389f 100644 --- a/swash/processing/swash.py +++ b/swash/processing/swash.py @@ -66,4 +66,8 @@ with tempfile.TemporaryDirectory(prefix="swash_", dir=".") as tmp_raw: log.info(f"Moving swash output to '{out}'") shutil.move(tmpdir, out) +for f in out.rglob("*"): + if f.is_file(): + f.chmod(0o444) + log.info(f"Swash model finished successfully")