summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/connection/zone.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/plugins/connection/zone.py')
-rw-r--r--lib/ansible/plugins/connection/zone.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ansible/plugins/connection/zone.py b/lib/ansible/plugins/connection/zone.py
index f4fee5ccb0..5d6dafca36 100644
--- a/lib/ansible/plugins/connection/zone.py
+++ b/lib/ansible/plugins/connection/zone.py
@@ -24,6 +24,7 @@ __metaclass__ = type
import distutils.spawn
import os
import os.path
+import pipes
import subprocess
import traceback
@@ -157,7 +158,7 @@ class Connection(ConnectionBase):
super(Connection, self).put_file(in_path, out_path)
self._display.vvv("PUT %s TO %s" % (in_path, out_path), host=self.zone)
- out_path = self._prefix_login_path(out_path)
+ out_path = pipes.quote(self._prefix_login_path(out_path))
try:
with open(in_path, 'rb') as in_file:
try:
@@ -179,7 +180,7 @@ class Connection(ConnectionBase):
super(Connection, self).fetch_file(in_path, out_path)
self._display.vvv("FETCH %s TO %s" % (in_path, out_path), host=self.zone)
- in_path = self._prefix_login_path(in_path)
+ in_path = pipes.quote(self._prefix_login_path(in_path))
try:
p = self._buffered_exec_command('dd if=%s bs=%s' % (in_path, BUFSIZE))
except OSError: