Handle empty docker log periods

This commit is contained in:
2026-02-08 00:54:13 +03:00
parent be65398b86
commit 61236b9d60
2 changed files with 13 additions and 0 deletions

View File

@@ -102,6 +102,9 @@ async def log_filter_input(msg: Message):
if rc != 0:
await msg.answer(out, reply_markup=docker_kb)
return
if not out.strip():
await msg.answer("⚠️ Нет логов за выбранный период", reply_markup=docker_kb)
return
lines = [line for line in out.splitlines() if needle.lower() in line.lower()]
filtered = "\n".join(lines) if lines else "(no matches)"