mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Fix invalid string escape sequences.
This commit is contained in:
@@ -137,7 +137,7 @@ from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
def parse_out(string):
|
||||
return re.sub("\s+", " ", string).strip()
|
||||
return re.sub(r"\s+", " ", string).strip()
|
||||
|
||||
|
||||
def has_changed(string):
|
||||
|
||||
@@ -220,7 +220,7 @@ class Npm(object):
|
||||
if dep:
|
||||
# node.js v0.10.22 changed the `npm outdated` module separator
|
||||
# from "@" to " ". Split on both for backwards compatibility.
|
||||
pkg, other = re.split('\s|@', dep, 1)
|
||||
pkg, other = re.split(r'\s|@', dep, 1)
|
||||
outdated.append(pkg)
|
||||
|
||||
return outdated
|
||||
|
||||
Reference in New Issue
Block a user