Lint: W605 invalid escape sequence '\$'
This commit is contained in:
parent
639937f9c2
commit
76b1cafdcc
|
@ -79,7 +79,7 @@ def list_ova(limit, is_fuzzy=True):
|
||||||
limit = '%' + limit
|
limit = '%' + limit
|
||||||
else:
|
else:
|
||||||
limit = limit[1:]
|
limit = limit[1:]
|
||||||
if not re.match('.*\$', limit):
|
if not re.match('.*[$]', limit):
|
||||||
limit = limit + '%'
|
limit = limit + '%'
|
||||||
else:
|
else:
|
||||||
limit = limit[:-1]
|
limit = limit[:-1]
|
||||||
|
|
|
@ -106,7 +106,7 @@ def list_template(limit, table, is_fuzzy=True):
|
||||||
limit = '%' + limit
|
limit = '%' + limit
|
||||||
else:
|
else:
|
||||||
limit = limit[1:]
|
limit = limit[1:]
|
||||||
if not re.match('.*\$', limit):
|
if not re.match('.*[$]', limit):
|
||||||
limit = limit + '%'
|
limit = limit + '%'
|
||||||
else:
|
else:
|
||||||
limit = limit[:-1]
|
limit = limit[:-1]
|
||||||
|
@ -588,7 +588,7 @@ def list_userdata(limit, is_fuzzy=True):
|
||||||
limit = '%' + limit
|
limit = '%' + limit
|
||||||
else:
|
else:
|
||||||
limit = limit[1:]
|
limit = limit[1:]
|
||||||
if not re.match('.*\$', limit):
|
if not re.match('.*[$]', limit):
|
||||||
limit = limit + '%'
|
limit = limit + '%'
|
||||||
else:
|
else:
|
||||||
limit = limit[:-1]
|
limit = limit[:-1]
|
||||||
|
@ -679,7 +679,7 @@ def list_script(limit, is_fuzzy=True):
|
||||||
limit = '%' + limit
|
limit = '%' + limit
|
||||||
else:
|
else:
|
||||||
limit = limit[1:]
|
limit = limit[1:]
|
||||||
if not re.match('.*\$', limit):
|
if not re.match('.*[$]', limit):
|
||||||
limit = limit + '%'
|
limit = limit + '%'
|
||||||
else:
|
else:
|
||||||
limit = limit[:-1]
|
limit = limit[:-1]
|
||||||
|
@ -770,7 +770,7 @@ def list_profile(limit, is_fuzzy=True):
|
||||||
limit = '%' + limit
|
limit = '%' + limit
|
||||||
else:
|
else:
|
||||||
limit = limit[1:]
|
limit = limit[1:]
|
||||||
if not re.match('.*\$', limit):
|
if not re.match('.*[$]', limit):
|
||||||
limit = limit + '%'
|
limit = limit + '%'
|
||||||
else:
|
else:
|
||||||
limit = limit[:-1]
|
limit = limit[:-1]
|
||||||
|
|
|
@ -324,7 +324,7 @@ def get_list_osd(zk_conn, limit, is_fuzzy=True):
|
||||||
# Implicitly assume fuzzy limits
|
# Implicitly assume fuzzy limits
|
||||||
if not re.match('[^].*', limit):
|
if not re.match('[^].*', limit):
|
||||||
limit = '.*' + limit
|
limit = '.*' + limit
|
||||||
if not re.match('.*\$', limit):
|
if not re.match('.*[$]', limit):
|
||||||
limit = limit + '.*'
|
limit = limit + '.*'
|
||||||
|
|
||||||
for osd in full_osd_list:
|
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
|
# Implicitly assume fuzzy limits
|
||||||
if not re.match('[^].*', limit):
|
if not re.match('[^].*', limit):
|
||||||
limit = '.*' + limit
|
limit = '.*' + limit
|
||||||
if not re.match('.*\$', limit):
|
if not re.match('.*[$]', limit):
|
||||||
limit = limit + '.*'
|
limit = limit + '.*'
|
||||||
|
|
||||||
for volume in full_volume_list:
|
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
|
# Implicitly assume fuzzy limits
|
||||||
if not re.match('[^].*', limit):
|
if not re.match('[^].*', limit):
|
||||||
limit = '.*' + limit
|
limit = '.*' + limit
|
||||||
if not re.match('.*\$', limit):
|
if not re.match('.*[$]', limit):
|
||||||
limit = limit + '.*'
|
limit = limit + '.*'
|
||||||
|
|
||||||
for snapshot in full_snapshot_list:
|
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
|
# Implcitly assume fuzzy limits
|
||||||
if not re.match('[^].*', limit):
|
if not re.match('[^].*', limit):
|
||||||
limit = '.*' + limit
|
limit = '.*' + limit
|
||||||
if not re.match('.*\$', limit):
|
if not re.match('.*[$]', limit):
|
||||||
limit = limit + '.*'
|
limit = limit + '.*'
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return False, 'Regex Error: {}'.format(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
|
# Implcitly assume fuzzy limits
|
||||||
if not re.match('[^].*', limit):
|
if not re.match('[^].*', limit):
|
||||||
limit = '.*' + limit
|
limit = '.*' + limit
|
||||||
if not re.match('.*\$', limit):
|
if not re.match('.*[$]', limit):
|
||||||
limit = limit + '.*'
|
limit = limit + '.*'
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return False, 'Regex Error: {}'.format(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
|
# Implcitly assume fuzzy limits
|
||||||
if not re.match('[^].*', limit):
|
if not re.match('[^].*', limit):
|
||||||
limit = '.*' + limit
|
limit = '.*' + limit
|
||||||
if not re.match('.*\$', limit):
|
if not re.match('.*[$]', limit):
|
||||||
limit = limit + '.*'
|
limit = limit + '.*'
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return False, 'Regex Error: {}'.format(e)
|
return False, 'Regex Error: {}'.format(e)
|
||||||
|
|
Loading…
Reference in New Issue