mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Remove unnecessary complexity and string increment
This commit is contained in:
parent
48e8d90343
commit
424383b8c4
1 changed files with 1 additions and 5 deletions
|
@ -692,11 +692,7 @@ def install(name=None,
|
|||
match = re.match(r'^([<>])?(=)?([^<>=]+)$', version_num)
|
||||
if match:
|
||||
gt_lt, equal, verstr = match.groups()
|
||||
prefix = gt_lt or ''
|
||||
prefix += equal or ''
|
||||
# If no prefix characters were supplied, use '='
|
||||
prefix = prefix or '='
|
||||
targets.append('{0}{1}{2}'.format(param, prefix, verstr))
|
||||
targets.append('{0}{1}{2}'.format(param, ((gt_lt or '') + (equal or '')) or '=', verstr))
|
||||
log.debug(targets)
|
||||
else:
|
||||
msg = ('Invalid version string {0!r} for package '
|
||||
|
|
Loading…
Add table
Reference in a new issue