Skip to content

Commit

Permalink
csmock: use Path.name to get the basename
Browse files Browse the repository at this point in the history
... and not `Path.stem` which also removes a filename suffix.

Fixes: b2c7201 ("csmock: use the root mock profile property for lock names")
Resolves: https://issues.redhat.com/browse/OSH-464
  • Loading branch information
lzaoral committed Jun 12, 2024
1 parent a059ab9 commit 722830c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/csmock
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class MockWrapper:
self.mock_root = self.mock_root.strip()

# use only the basename of the mock root
lock_name = pathlib.Path(self.mock_root).parent.stem
lock_name = pathlib.Path(self.mock_root).parent.name

lock = f"/tmp/.csmock-{lock_name.replace('/', '_')}"
self.lock_file = f"{lock}.lock"
Expand Down

0 comments on commit 722830c

Please sign in to comment.