mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Handle version=None when converted to a string it becomes 'None'
parm should default to empty string rather than None, it would fix better with existing code.
This commit is contained in:
parent
4fb2bb1856
commit
7167549425
1 changed files with 2 additions and 2 deletions
|
@ -1027,7 +1027,7 @@ def install(name=None, refresh=False, pkgs=None, **kwargs):
|
|||
# The user user salt cmdline with version=5.3 might be interpreted
|
||||
# as a float it must be converted to a string in order for
|
||||
# string matching to work.
|
||||
if not isinstance(version_num, six.string_types):
|
||||
if not isinstance(version_num, six.string_types) and version_num is not None:
|
||||
version_num = str(version_num)
|
||||
|
||||
if not version_num:
|
||||
|
@ -1363,7 +1363,7 @@ def remove(name=None, pkgs=None, version=None, **kwargs):
|
|||
# The user user salt cmdline with version=5.3 might be interpreted
|
||||
# as a float it must be converted to a string in order for
|
||||
# string matching to work.
|
||||
if not isinstance(version_num, six.string_types):
|
||||
if not isinstance(version_num, six.string_types) and version_num is not None:
|
||||
version_num = str(version_num)
|
||||
if version_num not in pkginfo and 'latest' in pkginfo:
|
||||
version_num = 'latest'
|
||||
|
|
Loading…
Add table
Reference in a new issue