From 0782b28460057a913ac7ef7bf2fcf6bdc2debc58 Mon Sep 17 00:00:00 2001 From: sebres Date: Tue, 8 Aug 2017 21:13:49 +0200 Subject: [PATCH] allow usage of "-" character in the name of sections by extended interpolation (like `%(my-section/some-value)s`). --- fail2ban/client/configparserinc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fail2ban/client/configparserinc.py b/fail2ban/client/configparserinc.py index 1ac980e0..cc245b0a 100644 --- a/fail2ban/client/configparserinc.py +++ b/fail2ban/client/configparserinc.py @@ -117,8 +117,8 @@ after = 1.conf SECTION_NAME = "INCLUDES" - SECTION_OPT_CRE = re.compile(r'^(\w+)/(.+)$') - SECTION_OPTSUBST_CRE = re.compile(r'%\((\w+/([^\)]+))\)s') + SECTION_OPT_CRE = re.compile(r'^([\w\-]+)/(.+)$') + SECTION_OPTSUBST_CRE = re.compile(r'%\(([\w\-]+/([^\)]+))\)s') CONDITIONAL_RE = re.compile(r"^(\w+)(\?.+)$")