diff options
author | Sean McGinnis <sean.mcginnis@gmail.com> | 2019-04-09 16:23:33 -0500 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2019-04-10 14:51:16 +0000 |
commit | 2a8b07b4994bda0170f1d072f266ffce375ea0cb (patch) | |
tree | b24f14fb12ce4b4e9f18cd138f5bf7ff4cea08bb | |
parent | 2bba6767c0b66f4ff541d0ac900da90f57b1e1c1 (diff) | |
download | oslo-vmware-2a8b07b4994bda0170f1d072f266ffce375ea0cb.tar.gz |
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>
-rw-r--r-- | oslo_vmware/objects/datastore.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/oslo_vmware/objects/datastore.py b/oslo_vmware/objects/datastore.py index ef3bf7f..96c55ff 100644 --- a/oslo_vmware/objects/datastore.py +++ b/oslo_vmware/objects/datastore.py @@ -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: |