mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Avoid re.split as it's a bit less efficient and a bit harder to read.
This commit is contained in:
parent
e07cbb033f
commit
e8c599b0f7
1 changed files with 1 additions and 1 deletions
|
@ -91,7 +91,7 @@ def split_host_pattern(pattern):
|
|||
# If it's got commas in it, we'll treat it as a straightforward
|
||||
# comma-separated list of patterns.
|
||||
if ',' in pattern:
|
||||
patterns = re.split('\s*,\s*', pattern)
|
||||
patterns = pattern.split(',')
|
||||
|
||||
# If it doesn't, it could still be a single pattern. This accounts for
|
||||
# non-separator uses of colons: IPv6 addresses and [x:y] host ranges.
|
||||
|
|
Loading…
Reference in a new issue