mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #25406 from alprs/fix-apt_version_cmp_types
Force arguments to aptpkg.version_cmp into strings
This commit is contained in:
commit
81bed62d16
1 changed files with 4 additions and 0 deletions
|
@ -1123,6 +1123,10 @@ def version_cmp(pkg1, pkg2):
|
|||
|
||||
salt '*' pkg.version_cmp '0.2.4-0ubuntu1' '0.2.4.1-0ubuntu1'
|
||||
'''
|
||||
# both apt_pkg.version_compare and _cmd_quote need string arguments.
|
||||
pkg1 = str(pkg1)
|
||||
pkg2 = str(pkg2)
|
||||
|
||||
# if we have apt_pkg, this will be quickier this way
|
||||
# and also do not rely on shell.
|
||||
if HAS_APTPKG:
|
||||
|
|
Loading…
Add table
Reference in a new issue