From ea2ed7d241ea06422fea231a2fcc513b17597ab6 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Fri, 22 Nov 2024 17:47:41 +0400 Subject: [PATCH] permitted space in section headers to allow for AWS [profile blah] sections --- validate_ini.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/validate_ini.py b/validate_ini.py index 54a01cc63..b38b3ab6a 100755 --- a/validate_ini.py +++ b/validate_ini.py @@ -58,7 +58,7 @@ sys.exit(4) __author__ = 'Hari Sekhon' -__version__ = '0.12.2' +__version__ = '0.12.3' class IniValidatorTool(CLI): @@ -72,7 +72,7 @@ def __init__(self): self.re_suffix = re.compile(r'.*\.(?:ini|properties)$', re.I) # In Windows ini key cannot contain equals sign = or semicolon ; # key=val or [section] - self.re_ini_section = re.compile(r'^\s*\[([\w=\:\.-]+)\]\s*$') + self.re_ini_section = re.compile(r'^\s*\[([\w\s=\:\.-]+)\]\s*$') self.re_ini_key = re.compile(r'^\s*(?:[^\[;=]+)s*$') # INI value can be anything .* so not regex'ing it self.valid_ini_msg = ' => INI OK'