update
This commit is contained in:
@@ -23,7 +23,14 @@ logging.basicConfig(
|
||||
IDRAC_USER = os.getenv("IDRAC_USER", "root")
|
||||
IDRAC_PASS = os.getenv("IDRAC_PASS", "calvin")
|
||||
|
||||
OUTPUT_DIR = Path("idrac_info")
|
||||
# Resolve output dir relative to script location or CWD
|
||||
BASE_DIR = Path(__file__).resolve().parent
|
||||
if BASE_DIR.name == "scripts":
|
||||
DATA_DIR = BASE_DIR.parent
|
||||
else:
|
||||
DATA_DIR = Path("data").resolve()
|
||||
|
||||
OUTPUT_DIR = DATA_DIR / "temp" / "staging"
|
||||
OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
MAC_RE = re.compile(r"([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}")
|
||||
|
||||
Reference in New Issue
Block a user