[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#792833: ansible 1.7.2+dfsg-2+deb8u1



On Sun, Aug 30, 2015 at 03:21:13 -0400, Harlan Lieberman-Berg wrote:

> ++            with open(in_path, 'rb') as in_file:
> ++                try:
> ++                    p = self._buffered_exec_command('dd of=%s bs=%s' % (out_path, BUFSIZE), None, stdin=in_file)
> ++                except OSError:
> ++                    raise errors.AnsibleError("chroot connection requires dd command in the chroot")

This error message doesn't seem right.  If dd is not in the chroot,
exec("chroot") will still work, and you won't get an answer until later
when checking returncode?

Cheers,
Julien

> ++                try:
> ++                    stdout, stderr = p.communicate()
> ++                except:
> ++                    traceback.print_exc()
> ++                    raise errors.AnsibleError("failed to transfer file %s to %s" % (in_path, out_path))
> ++                if p.returncode != 0:
> ++                    raise errors.AnsibleError("failed to transfer file %s to %s:\n%s\n%s" % (in_path, out_path, stdout, stderr))
> +         except IOError:
> +-            traceback.print_exc()
> +-            raise errors.AnsibleError("failed to transfer file to %s" % out_path)
> ++            raise errors.AnsibleError("file or module does not exist at: %s" % in_path)
> + 

Attachment: signature.asc
Description: Digital signature


Reply to: