From 2a8b07b4994bda0170f1d072f266ffce375ea0cb Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Tue, 9 Apr 2019 16:23:33 -0500 Subject: [PATCH] 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 --- oslo_vmware/objects/datastore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oslo_vmware/objects/datastore.py b/oslo_vmware/objects/datastore.py index ef3bf7fe..96c55ff3 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: