summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorDaniel Watkins <daniel.watkins@canonical.com>2019-02-26 15:13:38 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-02-26 15:13:38 +0000
commitf0f09629a924435c223f405bea084401ecb7faa2 (patch)
tree5bb8c80e562bcce61abd1c2a59c6cb216bac1d62 /cloudinit
parent8cfcc28db1acc7594dbbf76b846f4964f40f9e63 (diff)
downloadvyos-cloud-init-f0f09629a924435c223f405bea084401ecb7faa2.tar.gz
vyos-cloud-init-f0f09629a924435c223f405bea084401ecb7faa2.zip
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
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/config/cc_rsyslog.py2
1 files changed, 1 insertions, 1 deletions
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<proto>[@]{0,2})'
- r'(([[](?P<bracket_addr>[^\]]*)[\]])|(?P<addr>[^:]*))'
+ r'(([\[](?P<bracket_addr>[^\]]*)[\]])|(?P<addr>[^:]*))'
r'([:](?P<port>[0-9]+))?$')