Revert "Lint: W605 invalid escape sequence '\^'"

This reverts commit 639937f9c2.
This commit is contained in:
2020-11-07 17:39:34 -05:00
parent f33398458e
commit 3ed97d209f
6 changed files with 14 additions and 14 deletions

View File

@ -322,7 +322,7 @@ def get_list_osd(zk_conn, limit, is_fuzzy=True):
if is_fuzzy and limit:
# Implicitly assume fuzzy limits
if not re.match('[^].*', limit):
if not re.match('\^.*', limit):
limit = '.*' + limit
if not re.match('.*\$', limit):
limit = limit + '.*'
@ -658,7 +658,7 @@ def get_list_volume(zk_conn, pool, limit, is_fuzzy=True):
limit = '^' + limit + '$'
else:
# Implicitly assume fuzzy limits
if not re.match('[^].*', limit):
if not re.match('\^.*', limit):
limit = '.*' + limit
if not re.match('.*\$', limit):
limit = limit + '.*'
@ -764,7 +764,7 @@ def get_list_snapshot(zk_conn, pool, volume, limit, is_fuzzy=True):
if is_fuzzy and limit:
# Implicitly assume fuzzy limits
if not re.match('[^].*', limit):
if not re.match('\^.*', limit):
limit = '.*' + limit
if not re.match('.*\$', limit):
limit = limit + '.*'

View File

@ -574,7 +574,7 @@ def get_list_dhcp(zk_conn, network, limit, only_static=False, is_fuzzy=True):
limit = '^' + limit + '$'
# Implcitly assume fuzzy limits
if not re.match('[^].*', limit):
if not re.match('\^.*', limit):
limit = '.*' + limit
if not re.match('.*\$', limit):
limit = limit + '.*'
@ -620,7 +620,7 @@ def get_list_acl(zk_conn, network, limit, direction, is_fuzzy=True):
limit = '^' + limit + '$'
# Implcitly assume fuzzy limits
if not re.match('[^].*', limit):
if not re.match('\^.*', limit):
limit = '.*' + limit
if not re.match('.*\$', limit):
limit = limit + '.*'

View File

@ -689,7 +689,7 @@ def get_list(zk_conn, node, state, limit, is_fuzzy=True):
if limit and is_fuzzy:
try:
# Implcitly assume fuzzy limits
if not re.match('[^].*', limit):
if not re.match('\^.*', limit):
limit = '.*' + limit
if not re.match('.*\$', limit):
limit = limit + '.*'