diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2017-10-25 19:38:08 -0700 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2017-11-10 17:27:05 -0800 |
commit | e8c599b0f7c1cfabcfc6bb952ad0a1306a138ea7 (patch) | |
tree | b5da2a19edd014a9f70c461d000c2cb9777928a4 /lib/ansible/inventory | |
parent | e07cbb033f9e9e2ca9c7553e898e09c7c1e110ec (diff) | |
download | ansible-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.py | 2 |
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. |