We've changed run_command to return native_strings
on python3, this means that we don't get bytes back by default. We probably do want bytes here so modify our call to run_command so we get bytes instead of text.
This commit is contained in:
parent
b091d39baf
commit
283205d7b3
1 changed files with 8 additions and 8 deletions
|
@ -97,13 +97,13 @@ EXAMPLES = '''
|
|||
|
||||
import datetime
|
||||
import glob
|
||||
import re
|
||||
import shlex
|
||||
import os
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.six import b
|
||||
|
||||
|
||||
def check_command(commandline):
|
||||
arguments = { 'chown': 'owner', 'chmod': 'mode', 'chgrp': 'group',
|
||||
'ln': 'state=link', 'mkdir': 'state=directory',
|
||||
|
@ -188,7 +188,7 @@ def main():
|
|||
args = shlex.split(args)
|
||||
startd = datetime.datetime.now()
|
||||
|
||||
rc, out, err = module.run_command(args, executable=executable, use_unsafe_shell=shell)
|
||||
rc, out, err = module.run_command(args, executable=executable, use_unsafe_shell=shell, encoding=None)
|
||||
|
||||
endd = datetime.datetime.now()
|
||||
delta = endd - startd
|
||||
|
|
Loading…
Reference in a new issue