Skip to content

Commit

Permalink
Correct gain intermediate path with tag
Browse files Browse the repository at this point in the history
  • Loading branch information
d-j-hatton committed Sep 17, 2024
1 parent 2869a62 commit 5441e40
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/murfey/server/gain.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ class Camera(Enum):
FALCON = 3


def _sanitise(gain_path: Path) -> Path:
dest = gain_path.parent / "gain" / gain_path.name.replace(" ", "_")
def _sanitise(gain_path: Path, tag: str = "") -> Path:
dest = (
gain_path.parent
/ (f"gain_{tag}" if tag else "gain")
/ gain_path.name.replace(" ", "_")
)
dest.write_bytes(gain_path.read_bytes())
return dest

Expand Down

0 comments on commit 5441e40

Please sign in to comment.