def _cat_file(self, filename): ssh_match = SSH_URI_RE.match(filename) addr = ssh_match.group('hostname') or self._address_of_master() if '!' in addr and self.ssh_key_name is None: raise ValueError('ssh_key_name must not be None') output = ssh_cat( self._ssh_bin, addr, self._ec2_key_pair_file, ssh_match.group('filesystem_path'), self.ssh_key_name, ) return read_file(filename, fileobj=StringIO(output))
def _cat_file(self, filename): ssh_match = SSH_URI_RE.match(filename) addr = ssh_match.group('hostname') or self._address_of_master() keyfile = self._key_filename_for(addr) output = ssh_cat( self._ssh_bin, addr, self._ec2_key_pair_file, ssh_match.group('filesystem_path'), keyfile, ) return read_file(filename, fileobj=BytesIO(output))
def _cat_file(self, filename): ssh_match = _SSH_URI_RE.match(filename) addr = ssh_match.group('hostname') or self._address_of_master() keyfile = self._key_filename_for(addr) output = ssh_cat( self._ssh_bin, addr, self._ec2_key_pair_file, ssh_match.group('filesystem_path'), keyfile, ) return read_file(filename, fileobj=BytesIO(output))