From b904fcda55eacf0ee7c65dc52bcf01605221625e Mon Sep 17 00:00:00 2001 From: Juan Chong Date: Fri, 2 Aug 2024 22:19:26 -0700 Subject: [PATCH] Fixed invalid escape sequence error --- install/usr/sbin/cloudflare-companion | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/usr/sbin/cloudflare-companion b/install/usr/sbin/cloudflare-companion index da104fa..d7413c8 100755 --- a/install/usr/sbin/cloudflare-companion +++ b/install/usr/sbin/cloudflare-companion @@ -286,7 +286,7 @@ def check_container_t2(c): def label_host(): for prop in c.attrs.get(u'Config').get(u'Labels'): value = c.attrs.get(u'Config').get(u'Labels').get(prop) - if re.match('traefik.*?\.rule', prop): + if re.match(r'traefik.*?\.rule', prop): if 'Host' in value: logger.debug("Container ID: %s rule value: %s", cont_id, value) extracted_domains = re.findall(r'\`([a-zA-Z0-9\.\-]+)\`', value) @@ -319,7 +319,7 @@ def check_service_t2(s): def label_host(): for prop in s.attrs.get(u'Spec').get(u'Labels'): value = s.attrs.get(u'Spec').get(u'Labels').get(prop) - if re.match('traefik.*?\.rule', prop): + if re.match(r'traefik.*?\.rule', prop): if 'Host' in value: logger.debug("Service ID: %s rule value: %s", cont_id, value) extracted_domains = re.findall(r'\`([a-zA-Z0-9\.\-]+)\`', value)