mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fix invalid string escape sequences.
This commit is contained in:
@@ -145,7 +145,7 @@ class Imgadm(object):
|
||||
|
||||
# Helper method to massage stderr
|
||||
def errmsg(self, stderr):
|
||||
match = re.match('^imgadm .*?: error \(\w+\): (.*): .*', stderr)
|
||||
match = re.match(r'^imgadm .*?: error \(\w+\): (.*): .*', stderr)
|
||||
if match:
|
||||
return match.groups()[0]
|
||||
else:
|
||||
@@ -236,7 +236,7 @@ class Imgadm(object):
|
||||
if rc != 0:
|
||||
self.module.fail_json(msg='Failed to import image: {0}'.format(self.errmsg(stderr)))
|
||||
|
||||
regex = 'Image {0} \(.*\) is already installed, skipping'.format(self.uuid)
|
||||
regex = r'Image {0} \(.*\) is already installed, skipping'.format(self.uuid)
|
||||
if re.match(regex, stdout):
|
||||
self.changed = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user