"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "salt/utils/stringutils.py" between
salt-2019.2.0.tar.gz and salt-2019.2.1.tar.gz

About: SaltStack is a systems management software for data center automation, cloud orchestration, server provisioning, configuration management and more. Community version.

stringutils.py  (salt-2019.2.0):stringutils.py  (salt-2019.2.1)
skipping to change at line 323 skipping to change at line 323
... ) ... )
<_sre.SRE_Match object at 0xb70639c0> <_sre.SRE_Match object at 0xb70639c0>
>>> >>>
''' '''
def __build_parts(text): def __build_parts(text):
lexer = shlex.shlex(text) lexer = shlex.shlex(text)
lexer.whitespace_split = True lexer.whitespace_split = True
lexer.commenters = '' lexer.commenters = ''
if '\'' in text: if r"'\"" in text:
lexer.quotes = ''
elif '\'' in text:
lexer.quotes = '"' lexer.quotes = '"'
elif '"' in text: elif '"' in text:
lexer.quotes = '\'' lexer.quotes = '\''
return list(lexer) return list(lexer)
regex = r'' regex = r''
for line in text.splitlines(): for line in text.splitlines():
parts = [re.escape(s) for s in __build_parts(line)] parts = [re.escape(s) for s in __build_parts(line)]
regex += r'(?:[\s]+)?{0}(?:[\s]+)?'.format(r'(?:[\s]+)?'.join(parts)) regex += r'(?:[\s]+)?{0}(?:[\s]+)?'.format(r'(?:[\s]+)?'.join(parts))
return r'(?m)^{0}$'.format(regex) return r'(?m)^{0}$'.format(regex)
 End of changes. 1 change blocks. 
1 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)