Commit 73b0dd4a by Grzegorz Nosek Committed by Michael DeHaan

Enable UTF-8 commands via the raw module

Paramiko does not allow Unicode strings as parameters, so encode
the command to UTF-8.

Test case:

ansible localhost -m raw -a 'echo ą'

(also tested on local and ssh transports without problems)
parent 2aef0335
......@@ -212,7 +212,7 @@ class Runner(object):
def _execute_raw(self, conn, tmp, inject=None):
''' execute a non-module command for bootstrapping, or if there's no python on a device '''
return ReturnData(conn=conn, result=dict(
stdout=self._low_level_exec_command(conn, self.module_args, tmp, sudoable = True)
stdout=self._low_level_exec_command(conn, self.module_args.encode('utf-8'), tmp, sudoable = True)
))
# ***************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment