Introduce _split_pattern to parse an "x:y:z" pattern

This function takes a string like 'foo:bar[1:2]:baz[x:y]-quux' and
returns a list of patterns ['foo', 'bar[1:2]', 'baz[x:y]-quux'], i.e.
splits the string on colons that are not part of a range specification.
pull/11958/head
Abhijit Menon-Sen 9 years ago committed by James Cammarata
parent 32034feec5
commit 1437b8e120

@ -533,7 +533,12 @@ class Inventory(object):
if subset_pattern is None:
self._subset = None
else:
<<<<<<< HEAD
subset_patterns = self._split_pattern(subset_pattern)
=======
subset_pattern = subset_pattern.replace(',',':')
subset_patterns = self._split_pattern(subset_pattern.replace(";",":"))
>>>>>>> Introduce _split_pattern to parse an "x:y:z" pattern
results = []
# allow Unix style @filename data
for x in subset_patterns:

Loading…
Cancel
Save