Lint: W605 invalid escape sequence '\$'
This commit is contained in:
@ -324,7 +324,7 @@ def get_list_osd(zk_conn, limit, is_fuzzy=True):
|
||||
# Implicitly assume fuzzy limits
|
||||
if not re.match('[^].*', limit):
|
||||
limit = '.*' + limit
|
||||
if not re.match('.*\$', limit):
|
||||
if not re.match('.*[$]', limit):
|
||||
limit = limit + '.*'
|
||||
|
||||
for osd in full_osd_list:
|
||||
@ -1072,7 +1072,7 @@ def get_list_volume(zk_conn, pool, limit, is_fuzzy=True):
|
||||
# Implicitly assume fuzzy limits
|
||||
if not re.match('[^].*', limit):
|
||||
limit = '.*' + limit
|
||||
if not re.match('.*\$', limit):
|
||||
if not re.match('.*[$]', limit):
|
||||
limit = limit + '.*'
|
||||
|
||||
for volume in full_volume_list:
|
||||
@ -1282,7 +1282,7 @@ def get_list_snapshot(zk_conn, pool, volume, limit, is_fuzzy=True):
|
||||
# Implicitly assume fuzzy limits
|
||||
if not re.match('[^].*', limit):
|
||||
limit = '.*' + limit
|
||||
if not re.match('.*\$', limit):
|
||||
if not re.match('.*[$]', limit):
|
||||
limit = limit + '.*'
|
||||
|
||||
for snapshot in full_snapshot_list:
|
||||
|
@ -569,7 +569,7 @@ def get_list_dhcp(zk_conn, network, limit, only_static=False, is_fuzzy=True):
|
||||
# Implcitly assume fuzzy limits
|
||||
if not re.match('[^].*', limit):
|
||||
limit = '.*' + limit
|
||||
if not re.match('.*\$', limit):
|
||||
if not re.match('.*[$]', limit):
|
||||
limit = limit + '.*'
|
||||
except Exception as e:
|
||||
return False, 'Regex Error: {}'.format(e)
|
||||
@ -614,7 +614,7 @@ def get_list_acl(zk_conn, network, limit, direction, is_fuzzy=True):
|
||||
# Implcitly assume fuzzy limits
|
||||
if not re.match('[^].*', limit):
|
||||
limit = '.*' + limit
|
||||
if not re.match('.*\$', limit):
|
||||
if not re.match('.*[$]', limit):
|
||||
limit = limit + '.*'
|
||||
except Exception as e:
|
||||
return False, 'Regex Error: {}'.format(e)
|
||||
|
@ -682,7 +682,7 @@ def get_list(zk_conn, node, state, limit, is_fuzzy=True):
|
||||
# Implcitly assume fuzzy limits
|
||||
if not re.match('[^].*', limit):
|
||||
limit = '.*' + limit
|
||||
if not re.match('.*\$', limit):
|
||||
if not re.match('.*[$]', limit):
|
||||
limit = limit + '.*'
|
||||
except Exception as e:
|
||||
return False, 'Regex Error: {}'.format(e)
|
||||
|
Reference in New Issue
Block a user