Skip to content

Commit

Permalink
chore: Update charm libraries (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
telcobot authored Jan 16, 2025
1 parent a4ef5c2 commit b6010a3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/charms/prometheus_k8s/v0/prometheus_scrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def _on_scrape_targets_changed(self, event):

# Increment this PATCH version before using `charmcraft publish-lib` or reset
# to 0 if you are raising the major API version
LIBPATCH = 47
LIBPATCH = 48

PYDEPS = ["cosl"]

Expand Down Expand Up @@ -2364,12 +2364,9 @@ def _get_tool_path(self) -> Optional[Path]:
arch = "amd64" if arch == "x86_64" else arch
res = "cos-tool-{}".format(arch)
try:
path = Path(res).resolve()
path.chmod(0o777)
path = Path(res).resolve(strict=True)
return path
except NotImplementedError:
logger.debug("System lacks support for chmod")
except FileNotFoundError:
except (FileNotFoundError, OSError):
logger.debug('Could not locate cos-tool at: "{}"'.format(res))
return None

Expand Down

0 comments on commit b6010a3

Please sign in to comment.