From f0f09629a924435c223f405bea084401ecb7faa2 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Tue, 26 Feb 2019 15:13:38 +0000 Subject: cc_rsyslog: Escape possible nested set Under Python 3.7, we are seeing `FutureWarning: Possible nested set at position 23`; escaping this bracket causes that warning to disappear. LP: #1816967 --- cloudinit/config/cc_rsyslog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudinit/config/cc_rsyslog.py b/cloudinit/config/cc_rsyslog.py index 27d2366c..22b17532 100644 --- a/cloudinit/config/cc_rsyslog.py +++ b/cloudinit/config/cc_rsyslog.py @@ -203,7 +203,7 @@ LOG = logging.getLogger(__name__) COMMENT_RE = re.compile(r'[ ]*[#]+[ ]*') HOST_PORT_RE = re.compile( r'^(?P[@]{0,2})' - r'(([[](?P[^\]]*)[\]])|(?P[^:]*))' + r'(([\[](?P[^\]]*)[\]])|(?P[^:]*))' r'([:](?P[0-9]+))?$') -- cgit v1.2.3