def fetch_file(self, in_path, out_path):
        ''' save a remote file to the specified path '''
        vvv("FETCH %s TO %s" % (in_path, out_path), host=self.host)
        try:
            self.sftp = self._connect_sftp()
        except:
            raise errors.AnsibleError("failed to open a SFTP connection")
        try:
            self.sftp.get(in_path, out_path)
        except IOError:
            raise errors.AnsibleError("failed to transfer file from %s" % in_path)
def fetch_file ( self , in_path , out_path ) : vvv ( "FETCH %s TO %s" % ( in_path , out_path ) , host = self . host ) try : self . sftp = self . _connect_sftp ( ) except : raise errors . AnsibleError ( "failed to open a SFTP connection" ) try : self . sftp . get ( in_path , out_path ) except IOError : raise errors . AnsibleError ( "failed to transfer file from %s" % in_path )
save a remote file to the specified path