Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dlopes7 committed Oct 8, 2024
1 parent e3cdc3b commit 7eb8981
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dynatrace_extension/sdk/communication.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def send_metrics(self, mint_lines: list[str]) -> list[MintResponse]:
response = request(
"POST",
f"http://localhost:{self.local_ingest_port}/metrics/ingest",
body='\n'.join(lines).encode(),
body="\n".join(lines).encode(),
headers={"Content-Type": CONTENT_TYPE_PLAIN},
).json()
mint_response = MintResponse.from_json(response)
Expand Down
6 changes: 5 additions & 1 deletion dynatrace_extension/sdk/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ def find_log_dir() -> Path:
if line.startswith("LogDir"):
log_dir = line.split("=")[1].strip()
if not log_dir:
return Path(os.path.expandvars("%PROGRAMDATA%") + "/dynatrace/oneagent/log") if os.name == "nt" else Path("/var/log/dynatrace/oneagent")
return (
Path(os.path.expandvars("%PROGRAMDATA%") + "/dynatrace/oneagent/log")
if os.name == "nt"
else Path("/var/log/dynatrace/oneagent")
)
return Path(log_dir)
msg = f"Could not find LogDir in {installation_conf}"
raise Exception(msg)

0 comments on commit 7eb8981

Please sign in to comment.