mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-31 21:39:10 -07:00
Fix invalid string escape sequences.
This commit is contained in:
parent
f9cd50411f
commit
e45c763b64
48 changed files with 77 additions and 77 deletions
|
@ -480,9 +480,9 @@ class PacketInventory(object):
|
|||
|
||||
def to_safe(self, word):
|
||||
''' Converts 'bad' characters in a string to underscores so they can be used as Ansible groups '''
|
||||
regex = "[^A-Za-z0-9\_"
|
||||
regex = r"[^A-Za-z0-9\_"
|
||||
if not self.replace_dash_in_groups:
|
||||
regex += "\-"
|
||||
regex += r"\-"
|
||||
return re.sub(regex + "]", "_", word)
|
||||
|
||||
def json_format_dict(self, data, pretty=False):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue