Verified Commit 3c4325fd authored by Sebastian Endres's avatar Sebastian Endres
Browse files

Warn if log_dir in result.json does not exist

parent ef196458
"""Parse quic-interop-runner result.json files.""" """Parse quic-interop-runner result.json files."""
import json import json
import logging
import re import re
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from dataclasses import dataclass from dataclasses import dataclass
...@@ -300,10 +301,16 @@ class Result: ...@@ -300,10 +301,16 @@ class Result:
def log_dir(self) -> Path: def log_dir(self) -> Path:
"""The path to the detailed logs.""" """The path to the detailed logs."""
log_dir = Path(self.raw_data["log_dir"]) log_dir = Path(self.raw_data["log_dir"])
if log_dir.is_absolute():
return log_dir if not log_dir.is_absolute():
else: log_dir = self.file_path.parent / log_dir
return self.file_path.parent / log_dir
if not log_dir.is_dir():
logging.warning(
f"The log dir {log_dir} given in {self.file_path} does not exist"
)
return log_dir
@log_dir.setter @log_dir.setter
def log_dir(self, value: Path): def log_dir(self, value: Path):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment