Erik Johnson 2017-08-09 15:55:52 -05:00
parent 333d86d96c
commit 59e19a9c15
2 changed files with 4 additions and 3 deletions

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)