(
self, local_path, remote_path, host, results, mode=None, mirror_local_mode=False
)
| 317 | results[host] = self._generate_error_result(exc=ex, message=error) |
| 318 | |
| 319 | def _put_files( |
| 320 | self, local_path, remote_path, host, results, mode=None, mirror_local_mode=False |
| 321 | ): |
| 322 | try: |
| 323 | LOG.debug("Copying file to host: %s" % host) |
| 324 | if os.path.isdir(local_path): |
| 325 | result = self._hosts_client[host].put_dir(local_path, remote_path) |
| 326 | else: |
| 327 | result = self._hosts_client[host].put( |
| 328 | local_path, |
| 329 | remote_path, |
| 330 | mirror_local_mode=mirror_local_mode, |
| 331 | mode=mode, |
| 332 | ) |
| 333 | LOG.debug("Result of copy: %s" % result) |
| 334 | results[host] = result |
| 335 | except Exception as ex: |
| 336 | error = "Failed sending file(s) in path %s to host %s" % (local_path, host) |
| 337 | LOG.exception(error) |
| 338 | results[host] = self._generate_error_result(exc=ex, message=error) |
| 339 | |
| 340 | def _mkdir(self, host, path, results): |
| 341 | try: |
nothing calls this directly
no test coverage detected