From c5c7de8b2b0681c75bc306ea47389951582f170b Mon Sep 17 00:00:00 2001 From: John Supplee Date: Tue, 29 Jan 2019 17:42:17 +0200 Subject: [PATCH] allow decimal points in quotas --- management/mailconfig.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/management/mailconfig.py b/management/mailconfig.py index 62ca1d39..73b166a1 100755 --- a/management/mailconfig.py +++ b/management/mailconfig.py @@ -351,9 +351,9 @@ def validate_quota(quota): if quota == "": raise ValueError("No quota provided.") - if re.search(r"[\s,.]", quota): + if re.search(r"[\s,]", quota): raise ValueError("Quotas cannot contain spaces or commas.") - if not re.match(r'^\d+[GM]?$', quota): + if not re.match(r'^[\d\.]+[GM]?$', quota): raise ValueError("Invalid quota.") return quota