Revert "Lint: W605 invalid escape sequence '\$'"
This reverts commit 76b1cafdcc
.
This commit is contained in:
parent
d37e5a0c0b
commit
f33398458e
|
@ -74,7 +74,7 @@ def list_ova(limit, is_fuzzy=True):
|
|||
limit = '%' + limit
|
||||
else:
|
||||
limit = limit[1:]
|
||||
if not re.match('.*[$]', limit):
|
||||
if not re.match('.*\$', limit):
|
||||
limit = limit + '%'
|
||||
else:
|
||||
limit = limit[:-1]
|
||||
|
|
|
@ -110,7 +110,7 @@ def list_template(limit, table, is_fuzzy=True):
|
|||
limit = '%' + limit
|
||||
else:
|
||||
limit = limit[1:]
|
||||
if not re.match('.*[$]', limit):
|
||||
if not re.match('.*\$', limit):
|
||||
limit = limit + '%'
|
||||
else:
|
||||
limit = limit[:-1]
|
||||
|
@ -610,7 +610,7 @@ def list_userdata(limit, is_fuzzy=True):
|
|||
limit = '%' + limit
|
||||
else:
|
||||
limit = limit[1:]
|
||||
if not re.match('.*[$]', limit):
|
||||
if not re.match('.*\$', limit):
|
||||
limit = limit + '%'
|
||||
else:
|
||||
limit = limit[:-1]
|
||||
|
@ -705,7 +705,7 @@ def list_script(limit, is_fuzzy=True):
|
|||
limit = '%' + limit
|
||||
else:
|
||||
limit = limit[1:]
|
||||
if not re.match('.*[$]', limit):
|
||||
if not re.match('.*\$', limit):
|
||||
limit = limit + '%'
|
||||
else:
|
||||
limit = limit[:-1]
|
||||
|
@ -800,7 +800,7 @@ def list_profile(limit, is_fuzzy=True):
|
|||
limit = '%' + limit
|
||||
else:
|
||||
limit = limit[1:]
|
||||
if not re.match('.*[$]', limit):
|
||||
if not re.match('.*\$', limit):
|
||||
limit = limit + '%'
|
||||
else:
|
||||
limit = limit[:-1]
|
||||
|
|
|
@ -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:
|
||||
|
@ -660,7 +660,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:
|
||||
|
@ -766,7 +766,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:
|
||||
|
|
|
@ -576,7 +576,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)
|
||||
|
@ -622,7 +622,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)
|
||||
|
|
|
@ -691,7 +691,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)
|
||||
|
|
Loading…
Reference in New Issue