mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Fix invalid string escape sequences.
This commit is contained in:
parent
6ac9d05de6
commit
9735a70059
49 changed files with 81 additions and 81 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue