mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-04 23:50:20 -07: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
|
# If it's got commas in it, we'll treat it as a straightforward
|
||||||
# comma-separated list of patterns.
|
# comma-separated list of patterns.
|
||||||
if ',' in pattern:
|
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
|
# 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.
|
# non-separator uses of colons: IPv6 addresses and [x:y] host ranges.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue