~abentley/juju-ci-tools/client-from-config-4

« back to all changes in this revision

Viewing changes to remote.py

  • Committer: Curtis Hovey
  • Date: 2015-12-20 15:14:05 UTC
  • Revision ID: curtis@canonical.com-20151220151405-pm3dauunjr2978gz
skip any client-server that starts with 1.26.

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
    def run(self, command):
125
125
        """Run a command on the remote machine."""
126
126
        if self.use_juju_ssh:
127
 
            logging.debug('juju ssh {}'.format(self.unit))
128
127
            try:
129
128
                return self.client.get_juju_output("ssh", self.unit, command,
130
129
                                                   timeout=self.timeout)
137
136
        args = ["ssh"]
138
137
        args.extend(self._ssh_opts)
139
138
        args.extend([self.address, command])
140
 
        logging.debug(' '.join(utility.quote(i) for i in args))
141
139
        return self._run_subprocess(args)
142
140
 
143
141
    def copy(self, destination_dir, source_globs):
303
301
                # Just defense against path traversal bugs, should never reach.
304
302
                raise ValueError("path not filename {!r}".format(filename))
305
303
            with open(os.path.join(destination_dir, filename), "wb") as f:
306
 
                f.write(zlib.decompress(output[mid + 1:end].decode("base64"),
 
304
                f.write(zlib.decompress(output[mid+1:end].decode("base64"),
307
305
                                        -zlib.MAX_WBITS))
308
306
            start = end + 1