Fix invalid escape sequence warnings
Starting with py36, DeprecationWarnings are raised for special characters in strings that are not being used as valid escape sequences. This addresses a couple instances we had for string replacement by changing the replacement strings to be raw strings. Change-Id: I93291e978aacaf3f639f32174605528f0038f13a Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
614b2cb1d5
commit
d71c267b9d
@ -348,7 +348,7 @@ class ISCSIConnector(base.BaseLinuxConnector, base_iscsi.BaseISCSIConnector):
|
||||
ip, port = connection_properties['target_portal'].rsplit(':', 1)
|
||||
# NOTE(geguileo): I don't know if IPv6 will be reported with []
|
||||
# or not, so we'll make them optional.
|
||||
ip = ip.replace('[', '\[?').replace(']', '\]?')
|
||||
ip = ip.replace('[', r'\[?').replace(']', r'\]?')
|
||||
out = self._run_iscsiadm_bare(['-m', 'discoverydb',
|
||||
'-o', 'show',
|
||||
'-P', 1])[0] or ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user