Fix invalid escape sequence warning

Python 3.6 is more strict about special characters in regular strings if
they are invalid escape sequences. This most often happens in regex
strings. This fixes one instance by switching the regex string to use a
raw string.

Change-Id: I73a7393fe04c920c7d82a2fa68f1cf0c7d453a7d
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2019-04-09 16:23:33 -05:00 committed by Stephen Finucane
parent 2bba6767c0
commit 2a8b07b499

View File

@ -113,7 +113,7 @@ def get_dsc_ref_and_name(session, dsc_val):
:param ds_val: datastore cluster name or datastore cluster moid
:return: tuple of dastastore cluster moref and datastore cluster name
"""
if re.match("group-p\d+", dsc_val):
if re.match(r"group-p\d+", dsc_val):
# the configured value is moid
dsc_ref = vim_util.get_moref(dsc_val, 'StoragePod')
try: