@ -23,6 +23,7 @@ __metaclass__ = type
import distutils . spawn
import distutils . spawn
import os
import os
import os . path
import os . path
import pipes
import subprocess
import subprocess
from ansible import constants as C
from ansible import constants as C
@ -116,7 +117,7 @@ class Connection(ConnectionBase):
super ( Connection , self ) . put_file ( in_path , out_path )
super ( Connection , self ) . put_file ( in_path , out_path )
self . _display . vvv ( " PUT %s TO %s " % ( in_path , out_path ) , host = self . lxc )
self . _display . vvv ( " PUT %s TO %s " % ( in_path , out_path ) , host = self . lxc )
out_path = self . _prefix_login_path ( out_path )
out_path = pipes . quote ( self . _prefix_login_path ( out_path ) )
try :
try :
with open ( in_path , ' rb ' ) as in_file :
with open ( in_path , ' rb ' ) as in_file :
try :
try :
@ -138,7 +139,7 @@ class Connection(ConnectionBase):
super ( Connection , self ) . fetch_file ( in_path , out_path )
super ( Connection , self ) . fetch_file ( in_path , out_path )
self . _display . vvv ( " FETCH %s TO %s " % ( in_path , out_path ) , host = self . lxc )
self . _display . vvv ( " FETCH %s TO %s " % ( in_path , out_path ) , host = self . lxc )
in_path = self . _prefix_login_path ( in_path )
in_path = pipes . quote ( self . _prefix_login_path ( in_path ) )
try :
try :
p = self . _buffered_exec_command ( ' dd if= %s bs= %s ' % ( in_path , BUFSIZE ) )
p = self . _buffered_exec_command ( ' dd if= %s bs= %s ' % ( in_path , BUFSIZE ) )
except OSError :
except OSError :