Handle empty docker log periods
This commit is contained in:
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user