summaryrefslogtreecommitdiff
path: root/lib/ansible/inventory
diff options
context:
space:
mode:
authorToshio Kuratomi <a.badger@gmail.com>2017-10-25 19:38:08 -0700
committerToshio Kuratomi <a.badger@gmail.com>2017-11-10 17:27:05 -0800
commite8c599b0f7c1cfabcfc6bb952ad0a1306a138ea7 (patch)
treeb5da2a19edd014a9f70c461d000c2cb9777928a4 /lib/ansible/inventory
parente07cbb033f9e9e2ca9c7553e898e09c7c1e110ec (diff)
downloadansible-e8c599b0f7c1cfabcfc6bb952ad0a1306a138ea7.tar.gz
Avoid re.split as it's a bit less efficient and a bit harder to read.
Diffstat (limited to 'lib/ansible/inventory')
-rw-r--r--lib/ansible/inventory/manager.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/inventory/manager.py b/lib/ansible/inventory/manager.py
index 13ea13d4ef..167e7305e6 100644
--- a/lib/ansible/inventory/manager.py
+++ b/lib/ansible/inventory/manager.py
@@ -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.