Merge "Py3: Fix invalid escape sequencees"
This commit is contained in:
commit
318a5cf33d
@ -24,8 +24,8 @@ import re
|
||||
|
||||
|
||||
DEVICE_SCAN_ATTEMPTS_DEFAULT = 3
|
||||
MULTIPATH_ERROR_REGEX = re.compile("\w{3} \d+ \d\d:\d\d:\d\d \|.*$")
|
||||
MULTIPATH_PATH_CHECK_REGEX = re.compile("\s+\d+:\d+:\d+:\d+\s+")
|
||||
MULTIPATH_ERROR_REGEX = re.compile(r"\w{3} \d+ \d\d:\d\d:\d\d \|.*$")
|
||||
MULTIPATH_PATH_CHECK_REGEX = re.compile(r"\s+\d+:\d+:\d+:\d+\s+")
|
||||
|
||||
PLATFORM_ALL = 'ALL'
|
||||
PLATFORM_x86 = 'X86'
|
||||
|
@ -32,8 +32,8 @@ from os_brick import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
MULTIPATH_ERROR_REGEX = re.compile("\w{3} \d+ \d\d:\d\d:\d\d \|.*$")
|
||||
MULTIPATH_WWID_REGEX = re.compile("\((?P<wwid>.+)\)")
|
||||
MULTIPATH_ERROR_REGEX = re.compile(r"\w{3} \d+ \d\d:\d\d:\d\d \|.*$")
|
||||
MULTIPATH_WWID_REGEX = re.compile(r"\((?P<wwid>.+)\)")
|
||||
MULTIPATH_DEVICE_ACTIONS = ['unchanged:', 'reject:', 'reload:',
|
||||
'switchpg:', 'rename:', 'create:',
|
||||
'resize:']
|
||||
|
@ -158,7 +158,7 @@ class RemoteFsClient(executor.Executor):
|
||||
def _check_nfs_options(self):
|
||||
"""Checks and prepares nfs mount type options."""
|
||||
self._nfs_mount_type_opts = {'nfs': self._mount_options}
|
||||
nfs_vers_opt_patterns = ['^nfsvers', '^vers', '^v[\d]']
|
||||
nfs_vers_opt_patterns = ['^nfsvers', '^vers', r'^v[\d]']
|
||||
for opt in nfs_vers_opt_patterns:
|
||||
if self._option_exists(self._mount_options, opt):
|
||||
return
|
||||
@ -246,7 +246,7 @@ class VZStorageRemoteFSClient(RemoteFsClient):
|
||||
|
||||
def _do_mount(self, mount_type, vz_share, mount_path,
|
||||
mount_options=None, flags=None):
|
||||
m = re.search("(?:(\S+):\/)?([a-zA-Z0-9_-]+)(?::(\S+))?", vz_share)
|
||||
m = re.search(r"(?:(\S+):\/)?([a-zA-Z0-9_-]+)(?::(\S+))?", vz_share)
|
||||
if not m:
|
||||
msg = (_("Invalid Virtuozzo Storage share specification: %r."
|
||||
"Must be: [MDS1[,MDS2],...:/]<CLUSTER NAME>[:PASSWORD].")
|
||||
|
Loading…
Reference in New Issue
Block a user