Lint: W605 invalid escape sequence '\^'
This commit is contained in:
parent
63f4f9aed7
commit
639937f9c2
|
@ -75,7 +75,7 @@ def list_ova(limit, is_fuzzy=True):
|
|||
if limit:
|
||||
if is_fuzzy:
|
||||
# Handle fuzzy vs. non-fuzzy limits
|
||||
if not re.match('\^.*', limit):
|
||||
if not re.match('[^].*', limit):
|
||||
limit = '%' + limit
|
||||
else:
|
||||
limit = limit[1:]
|
||||
|
|
|
@ -102,7 +102,7 @@ def list_template(limit, table, is_fuzzy=True):
|
|||
if limit:
|
||||
if is_fuzzy:
|
||||
# Handle fuzzy vs. non-fuzzy limits
|
||||
if not re.match('\^.*', limit):
|
||||
if not re.match('[^].*', limit):
|
||||
limit = '%' + limit
|
||||
else:
|
||||
limit = limit[1:]
|
||||
|
@ -584,7 +584,7 @@ def list_userdata(limit, is_fuzzy=True):
|
|||
if limit:
|
||||
if is_fuzzy:
|
||||
# Handle fuzzy vs. non-fuzzy limits
|
||||
if not re.match('\^.*', limit):
|
||||
if not re.match('[^].*', limit):
|
||||
limit = '%' + limit
|
||||
else:
|
||||
limit = limit[1:]
|
||||
|
@ -675,7 +675,7 @@ def list_script(limit, is_fuzzy=True):
|
|||
if limit:
|
||||
if is_fuzzy:
|
||||
# Handle fuzzy vs. non-fuzzy limits
|
||||
if not re.match('\^.*', limit):
|
||||
if not re.match('[^].*', limit):
|
||||
limit = '%' + limit
|
||||
else:
|
||||
limit = limit[1:]
|
||||
|
@ -766,7 +766,7 @@ def list_profile(limit, is_fuzzy=True):
|
|||
if limit:
|
||||
if is_fuzzy:
|
||||
# Handle fuzzy vs. non-fuzzy limits
|
||||
if not re.match('\^.*', limit):
|
||||
if not re.match('[^].*', limit):
|
||||
limit = '%' + limit
|
||||
else:
|
||||
limit = limit[1:]
|
||||
|
|
|
@ -717,7 +717,7 @@ def vm_modify(domain, cfgfile, editor, restart):
|
|||
click.echo(colorama.Fore.GREEN + line + colorama.Fore.RESET)
|
||||
elif re.match('^\-', line) != None:
|
||||
click.echo(colorama.Fore.RED + line + colorama.Fore.RESET)
|
||||
elif re.match('^\^', line) != None:
|
||||
elif re.match('^[^]', line) != None:
|
||||
click.echo(colorama.Fore.BLUE + line + colorama.Fore.RESET)
|
||||
else:
|
||||
click.echo(line)
|
||||
|
@ -2924,7 +2924,7 @@ def provisioner_userdata_modify(name, filename, editor):
|
|||
click.echo(colorama.Fore.GREEN + line + colorama.Fore.RESET)
|
||||
elif re.match('^\-', line) != None:
|
||||
click.echo(colorama.Fore.RED + line + colorama.Fore.RESET)
|
||||
elif re.match('^\^', line) != None:
|
||||
elif re.match('^[^]', line) != None:
|
||||
click.echo(colorama.Fore.BLUE + line + colorama.Fore.RESET)
|
||||
else:
|
||||
click.echo(line)
|
||||
|
@ -3103,7 +3103,7 @@ def provisioner_script_modify(name, filename, editor):
|
|||
click.echo(colorama.Fore.GREEN + line + colorama.Fore.RESET)
|
||||
elif re.match('^\-', line) != None:
|
||||
click.echo(colorama.Fore.RED + line + colorama.Fore.RESET)
|
||||
elif re.match('^\^', line) != None:
|
||||
elif re.match('^[^]', line) != None:
|
||||
click.echo(colorama.Fore.BLUE + line + colorama.Fore.RESET)
|
||||
else:
|
||||
click.echo(line)
|
||||
|
|
|
@ -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 + '.*'
|
||||
|
@ -1070,7 +1070,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 + '.*'
|
||||
|
@ -1280,7 +1280,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 + '.*'
|
||||
|
|
|
@ -567,7 +567,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 + '.*'
|
||||
|
@ -612,7 +612,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 + '.*'
|
||||
|
|
|
@ -680,7 +680,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 + '.*'
|
||||
|
|
Loading…
Reference in New Issue