From 78a4e284080bdcbd004e84cadce2ece1bc72eedd Mon Sep 17 00:00:00 2001 From: "Alex V." <119082209+Retengart@users.noreply.github.com> Date: Sat, 7 Feb 2026 16:30:04 +0300 Subject: [PATCH] fix: guard against IndexError in dovecot_recalc_quota doveadm output ends with empty line, parts=[] causes parts[2] crash. --- cmdeploy/src/cmdeploy/remote/rshell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdeploy/src/cmdeploy/remote/rshell.py b/cmdeploy/src/cmdeploy/remote/rshell.py index 4e432cb9..0154d05a 100644 --- a/cmdeploy/src/cmdeploy/remote/rshell.py +++ b/cmdeploy/src/cmdeploy/remote/rshell.py @@ -40,5 +40,5 @@ def dovecot_recalc_quota(user): # for line in output.split("\n"): parts = line.split() - if parts[2] == "STORAGE": + if len(parts) >= 6 and parts[2] == "STORAGE": return dict(value=int(parts[3]), limit=int(parts[4]), percent=int(parts[5]))