Skip to content

Commit

Permalink
Merge pull request #107 from juchong/main
Browse files Browse the repository at this point in the history
Fixed invalid escape sequence errors
  • Loading branch information
tiredofit authored Oct 3, 2024
2 parents 41ce805 + b904fcd commit 653b8b6
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 653b8b6

Please sign in to comment.