def Copy(self, source_data, destination_file):
    """Handles the SCP file copy.

    Args:
      source_data: The source data to copy as a string
      destination_file: The file on the remote device

    Raises:
      ScpError: There was an error copying the file.
    """
    try:
      sshclient.ScpPut(self.transport, source_data, destination_file,
                       self._connect_timeout)
    except sshclient.ScpError as e:
      raise ScpError('SCP put failed: %s: %s' % (e.__class__.__name__, e))
dataset/ETHPy150Open google/capirca/tools/ldpush/pexpect_connection.py/ScpPutConnection.Copy/original