diff --git a/rpipe/__init__.py b/rpipe/__init__.py index 4f6a23d..a538a3f 100644 --- a/rpipe/__init__.py +++ b/rpipe/__init__.py @@ -1 +1 @@ -__version__: str = "9.5.2" # Must be "..", all numbers +__version__: str = "9.5.3" # Must be "..", all numbers diff --git a/rpipe/client/client/data.py b/rpipe/client/client/data.py index e8b69a4..3705cbf 100644 --- a/rpipe/client/client/data.py +++ b/rpipe/client/client/data.py @@ -66,6 +66,7 @@ def load(cls, cli: dict[str, bool | str | Path | None], file: Path) -> Self: conf = asdict(Config()) # Load config file then cli args if file.exists(): + file.chmod(_CONFIG_FILE_PERMISSIONS) # Update permissions in case permissions are bad log.debug("Loading config file %s", file) conf.update(loads(file.read_text(encoding="utf-8"))) else: @@ -87,8 +88,8 @@ def save(self, file: Path) -> None: log.warning("Creating config file: %s", file) file.touch(mode=_CONFIG_FILE_PERMISSIONS) log.debug("Permissions set to: %s", oct(_CONFIG_FILE_PERMISSIONS)) - file.chmod(_CONFIG_FILE_PERMISSIONS) # Update permissions in case permissions are bad file.write_text(dumps(asdict(self), default=str), encoding="utf-8") + file.chmod(_CONFIG_FILE_PERMISSIONS) # Update permissions in case permissions are bad log.info("Config saved to %s", file) def validate(self) -> None: