|
@@ -12,6 +12,8 @@ from dataclasses import dataclass, asdict, field, fields
|
|
|
|
|
|
|
|
from ..system import get_dir_size
|
|
from ..system import get_dir_size
|
|
|
|
|
|
|
|
|
|
+from ..config import OUTPUT_DIR, ARCHIVE_DIR_NAME
|
|
|
|
|
+
|
|
|
class ArchiveError(Exception):
|
|
class ArchiveError(Exception):
|
|
|
def __init__(self, message, hints=None):
|
|
def __init__(self, message, hints=None):
|
|
|
super().__init__(message)
|
|
super().__init__(message)
|
|
@@ -76,7 +78,7 @@ class ArchiveResult:
|
|
|
info['start_ts'] = parse_date(info['start_ts'])
|
|
info['start_ts'] = parse_date(info['start_ts'])
|
|
|
info['end_ts'] = parse_date(info['end_ts'])
|
|
info['end_ts'] = parse_date(info['end_ts'])
|
|
|
if "pwd" not in keys:
|
|
if "pwd" not in keys:
|
|
|
- info["pwd"] = str(os.getcwd() / Path(f"archive/{json_info['timestamp']}"))
|
|
|
|
|
|
|
+ info["pwd"] = str(Path(OUTPUT_DIR) / ARCHIVE_DIR_NAME / json_info["timestamp"])
|
|
|
if "cmd_version" not in keys:
|
|
if "cmd_version" not in keys:
|
|
|
info["cmd_version"] = "Undefined"
|
|
info["cmd_version"] = "Undefined"
|
|
|
if "cmd" not in keys:
|
|
if "cmd" not in keys:
|