Skip to content

Commit

Permalink
Fixed invalid escape sequence error
Browse files Browse the repository at this point in the history
  • Loading branch information
juchong committed Aug 3, 2024
1 parent 41ce805 commit b904fcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install/usr/sbin/cloudflare-companion
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b904fcd

Please sign in to comment.