mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-20 09:55:10 -04:00
fix: Use config information for path instead of hardcoded values
This commit is contained in:
parent
100fa5d1f5
commit
82f8f8b661
1 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,8 @@ from dataclasses import dataclass, asdict, field, fields
|
|||
|
||||
from ..system import get_dir_size
|
||||
|
||||
from ..config import OUTPUT_DIR, ARCHIVE_DIR_NAME
|
||||
|
||||
class ArchiveError(Exception):
|
||||
def __init__(self, message, hints=None):
|
||||
super().__init__(message)
|
||||
|
@ -76,7 +78,7 @@ class ArchiveResult:
|
|||
info['start_ts'] = parse_date(info['start_ts'])
|
||||
info['end_ts'] = parse_date(info['end_ts'])
|
||||
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:
|
||||
info["cmd_version"] = "Undefined"
|
||||
if "cmd" not in keys:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue