Revert "Lint: W605 invalid escape sequence '\^'"
This reverts commit 639937f9c2
.
This commit is contained in:
parent
f33398458e
commit
3ed97d209f
|
@ -70,7 +70,7 @@ def list_ova(limit, is_fuzzy=True):
|
||||||
if limit:
|
if limit:
|
||||||
if is_fuzzy:
|
if is_fuzzy:
|
||||||
# Handle fuzzy vs. non-fuzzy limits
|
# Handle fuzzy vs. non-fuzzy limits
|
||||||
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):
|
||||||
if limit:
|
if limit:
|
||||||
if is_fuzzy:
|
if is_fuzzy:
|
||||||
# Handle fuzzy vs. non-fuzzy limits
|
# Handle fuzzy vs. non-fuzzy limits
|
||||||
if not re.match('[^].*', limit):
|
if not re.match('\^.*', limit):
|
||||||
limit = '%' + limit
|
limit = '%' + limit
|
||||||
else:
|
else:
|
||||||
limit = limit[1:]
|
limit = limit[1:]
|
||||||
|
@ -606,7 +606,7 @@ def list_userdata(limit, is_fuzzy=True):
|
||||||
if limit:
|
if limit:
|
||||||
if is_fuzzy:
|
if is_fuzzy:
|
||||||
# Handle fuzzy vs. non-fuzzy limits
|
# Handle fuzzy vs. non-fuzzy limits
|
||||||
if not re.match('[^].*', limit):
|
if not re.match('\^.*', limit):
|
||||||
limit = '%' + limit
|
limit = '%' + limit
|
||||||
else:
|
else:
|
||||||
limit = limit[1:]
|
limit = limit[1:]
|
||||||
|
@ -701,7 +701,7 @@ def list_script(limit, is_fuzzy=True):
|
||||||
if limit:
|
if limit:
|
||||||
if is_fuzzy:
|
if is_fuzzy:
|
||||||
# Handle fuzzy vs. non-fuzzy limits
|
# Handle fuzzy vs. non-fuzzy limits
|
||||||
if not re.match('[^].*', limit):
|
if not re.match('\^.*', limit):
|
||||||
limit = '%' + limit
|
limit = '%' + limit
|
||||||
else:
|
else:
|
||||||
limit = limit[1:]
|
limit = limit[1:]
|
||||||
|
@ -796,7 +796,7 @@ def list_profile(limit, is_fuzzy=True):
|
||||||
if limit:
|
if limit:
|
||||||
if is_fuzzy:
|
if is_fuzzy:
|
||||||
# Handle fuzzy vs. non-fuzzy limits
|
# Handle fuzzy vs. non-fuzzy limits
|
||||||
if not re.match('[^].*', limit):
|
if not re.match('\^.*', limit):
|
||||||
limit = '%' + limit
|
limit = '%' + limit
|
||||||
else:
|
else:
|
||||||
limit = limit[1:]
|
limit = limit[1:]
|
||||||
|
|
|
@ -737,7 +737,7 @@ def vm_modify(domain, cfgfile, editor, restart):
|
||||||
click.echo(colorama.Fore.GREEN + line + colorama.Fore.RESET)
|
click.echo(colorama.Fore.GREEN + line + colorama.Fore.RESET)
|
||||||
elif re.match('^\-', line) is not None:
|
elif re.match('^\-', line) is not None:
|
||||||
click.echo(colorama.Fore.RED + line + colorama.Fore.RESET)
|
click.echo(colorama.Fore.RED + line + colorama.Fore.RESET)
|
||||||
elif re.match('^[^]', line) is not None:
|
elif re.match('^\^', line) is not None:
|
||||||
click.echo(colorama.Fore.BLUE + line + colorama.Fore.RESET)
|
click.echo(colorama.Fore.BLUE + line + colorama.Fore.RESET)
|
||||||
else:
|
else:
|
||||||
click.echo(line)
|
click.echo(line)
|
||||||
|
@ -3043,7 +3043,7 @@ def provisioner_userdata_modify(name, filename, editor):
|
||||||
click.echo(colorama.Fore.GREEN + line + colorama.Fore.RESET)
|
click.echo(colorama.Fore.GREEN + line + colorama.Fore.RESET)
|
||||||
elif re.match('^\-', line) is not None:
|
elif re.match('^\-', line) is not None:
|
||||||
click.echo(colorama.Fore.RED + line + colorama.Fore.RESET)
|
click.echo(colorama.Fore.RED + line + colorama.Fore.RESET)
|
||||||
elif re.match('^[^]', line) is not None:
|
elif re.match('^\^', line) is not None:
|
||||||
click.echo(colorama.Fore.BLUE + line + colorama.Fore.RESET)
|
click.echo(colorama.Fore.BLUE + line + colorama.Fore.RESET)
|
||||||
else:
|
else:
|
||||||
click.echo(line)
|
click.echo(line)
|
||||||
|
@ -3228,7 +3228,7 @@ def provisioner_script_modify(name, filename, editor):
|
||||||
click.echo(colorama.Fore.GREEN + line + colorama.Fore.RESET)
|
click.echo(colorama.Fore.GREEN + line + colorama.Fore.RESET)
|
||||||
elif re.match('^\-', line) is not None:
|
elif re.match('^\-', line) is not None:
|
||||||
click.echo(colorama.Fore.RED + line + colorama.Fore.RESET)
|
click.echo(colorama.Fore.RED + line + colorama.Fore.RESET)
|
||||||
elif re.match('^[^]', line) is not None:
|
elif re.match('^\^', line) is not None:
|
||||||
click.echo(colorama.Fore.BLUE + line + colorama.Fore.RESET)
|
click.echo(colorama.Fore.BLUE + line + colorama.Fore.RESET)
|
||||||
else:
|
else:
|
||||||
click.echo(line)
|
click.echo(line)
|
||||||
|
|
|
@ -322,7 +322,7 @@ def get_list_osd(zk_conn, limit, is_fuzzy=True):
|
||||||
|
|
||||||
if is_fuzzy and limit:
|
if is_fuzzy and limit:
|
||||||
# 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 + '.*'
|
||||||
|
@ -658,7 +658,7 @@ def get_list_volume(zk_conn, pool, limit, is_fuzzy=True):
|
||||||
limit = '^' + limit + '$'
|
limit = '^' + limit + '$'
|
||||||
else:
|
else:
|
||||||
# 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 + '.*'
|
||||||
|
@ -764,7 +764,7 @@ def get_list_snapshot(zk_conn, pool, volume, limit, is_fuzzy=True):
|
||||||
|
|
||||||
if is_fuzzy and limit:
|
if is_fuzzy and limit:
|
||||||
# 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 + '.*'
|
||||||
|
|
|
@ -574,7 +574,7 @@ def get_list_dhcp(zk_conn, network, limit, only_static=False, is_fuzzy=True):
|
||||||
limit = '^' + limit + '$'
|
limit = '^' + limit + '$'
|
||||||
|
|
||||||
# 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 + '.*'
|
||||||
|
@ -620,7 +620,7 @@ def get_list_acl(zk_conn, network, limit, direction, is_fuzzy=True):
|
||||||
limit = '^' + limit + '$'
|
limit = '^' + limit + '$'
|
||||||
|
|
||||||
# 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 + '.*'
|
||||||
|
|
|
@ -689,7 +689,7 @@ def get_list(zk_conn, node, state, limit, is_fuzzy=True):
|
||||||
if limit and is_fuzzy:
|
if limit and is_fuzzy:
|
||||||
try:
|
try:
|
||||||
# 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 + '.*'
|
||||||
|
|
Loading…
Reference in New Issue