fix: handle save_period_to_config errors, remove duplicate _MockIssue
- cli.py: wrap save_period_to_config in try/except to avoid unhandled traceback on disk full / permission denial (I2) - test_cli.py: remove duplicate _MockIssue class definition (I3)
This commit is contained in:
@@ -492,7 +492,14 @@ def main(argv: Optional[List[str]] = None) -> int:
|
||||
from_str = from_date
|
||||
to_str = to_date
|
||||
|
||||
save_period_to_config(args.config_path, from_str, to_str, precision, dynamic)
|
||||
try:
|
||||
save_period_to_config(args.config_path, from_str, to_str, precision, dynamic)
|
||||
except Exception as e:
|
||||
print(
|
||||
f"❌ Не удалось сохранить период в конфиг: {e}",
|
||||
file=sys.stderr,
|
||||
)
|
||||
return 1
|
||||
print(
|
||||
f"📌 Period committed [{from_str} -- {to_str}] → {args.config_path}",
|
||||
file=sys.stderr,
|
||||
|
||||
Reference in New Issue
Block a user