From 76b1cafdcc0d276bb0c038992d103b6696910644 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 6 Nov 2020 19:01:22 -0500 Subject: [PATCH] Lint: W605 invalid escape sequence '\$' --- api-daemon/pvcapid/ova.py | 2 +- api-daemon/pvcapid/provisioner.py | 8 ++++---- daemon-common/ceph.py | 6 +++--- daemon-common/network.py | 4 ++-- daemon-common/vm.py | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/api-daemon/pvcapid/ova.py b/api-daemon/pvcapid/ova.py index 66b263db..45908c83 100755 --- a/api-daemon/pvcapid/ova.py +++ b/api-daemon/pvcapid/ova.py @@ -79,7 +79,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] diff --git a/api-daemon/pvcapid/provisioner.py b/api-daemon/pvcapid/provisioner.py index 8fe6313c..27a6a223 100755 --- a/api-daemon/pvcapid/provisioner.py +++ b/api-daemon/pvcapid/provisioner.py @@ -106,7 +106,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] @@ -588,7 +588,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] @@ -679,7 +679,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] @@ -770,7 +770,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] diff --git a/daemon-common/ceph.py b/daemon-common/ceph.py index 4da366af..39215e58 100644 --- a/daemon-common/ceph.py +++ b/daemon-common/ceph.py @@ -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: diff --git a/daemon-common/network.py b/daemon-common/network.py index b5c2dfe9..9c8c84ae 100644 --- a/daemon-common/network.py +++ b/daemon-common/network.py @@ -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) diff --git a/daemon-common/vm.py b/daemon-common/vm.py index 1e36a9f8..5ed188d6 100644 --- a/daemon-common/vm.py +++ b/daemon-common/vm.py @@ -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)