Merge branch 'develop' into panos/develop

This commit is contained in:
spenceation 2017-08-10 10:25:25 -04:00 committed by GitHub
commit 0880121cf4
5 changed files with 11 additions and 7 deletions

View File

@ -258,8 +258,8 @@ if on_saltstack:
copyright = time.strftime("%Y")
# < --- START do not merge these settings to other branches START ---> #
build_type = 'latest' # latest, previous, develop, next
release = latest_release # version, latest_release, previous_release
build_type = 'develop' # latest, previous, develop, next
release = version # version, latest_release, previous_release
# < --- END do not merge these settings to other branches END ---> #
# Set google custom search engine

View File

@ -24,7 +24,9 @@ __grains__ = {}
def _serial_sanitizer(instr):
u'''Replaces the last 1/4 of a string with X's'''
'''
Replaces the last 1/4 of a string with X's
'''
length = len(instr)
index = int(math.floor(length * .75))
return u'{0}{1}'.format(instr[:index], u'X' * (length - index))

View File

@ -86,7 +86,6 @@ import salt.payload
import salt.pillar
import salt.syspaths
import salt.utils
import salt.pillar
import salt.utils.args
import salt.utils.context
import salt.utils.error
@ -319,7 +318,7 @@ def load_args_and_kwargs(func, args, data=None, ignore_invalid=False):
# list of positional arguments. This keyword argument is
# invalid.
for key, val in six.iteritems(string_kwarg):
invalid_kwargs.append(r'{0}={1}'.format(key, val))
invalid_kwargs.append(u'{0}={1}'.format(key, val))
else:
_args.append(arg)

View File

@ -1454,7 +1454,10 @@ def absent(name):
ret['comment'] = 'Directory {0} is set for removal'.format(name)
return ret
try:
__salt__['file.remove'](name)
if salt.utils.is_windows():
__salt__['file.remove'](name, force=True)
else:
__salt__['file.remove'](name)
ret['comment'] = 'Removed directory {0}'.format(name)
ret['changes']['removed'] = name
return ret

View File

@ -11,7 +11,7 @@
because on python 3 you can no longer compare strings against integers.
'''
# Import pytohn libs
# Import python libs
from __future__ import absolute_import
# pylint: disable=blacklisted-module
from distutils.version import StrictVersion as _StrictVersion