dest_contents isn’t always defined, so don’t pass it around

I think this is also a bit of a hack since it should probably be set
before being used, I’m just not sure what it should be set to.
pull/5091/head
Andrew Smith 11 years ago
parent e2d03173d2
commit eed32ea70c

@ -90,10 +90,10 @@ class ActionModule(object):
module_args = "%s src=%s dest=%s original_basename=%s" % (module_args, pipes.quote(xfered), pipes.quote(dest), pipes.quote(os.path.basename(src)))
if self.runner.noop_on_check(inject):
return ReturnData(conn=conn, comm_ok=True, result=dict(changed=True), diff=dict(before_header=dest, after_header=src, before=dest_contents, after=resultant))
return ReturnData(conn=conn, comm_ok=True, result=dict(changed=True), diff=dict(before_header=dest, after_header=src, after=resultant))
else:
res.diff = dict(before=dest_contents, after=resultant)
res = self.runner._execute_module(conn, tmp, 'copy', module_args, inject=inject)
res.diff = dict(after=resultant)
return res
else:
module_args = "%s src=%s dest=%s original_basename=%s" % (module_args, pipes.quote(xfered), pipes.quote(dest), pipes.quote(os.path.basename(src)))

Loading…
Cancel
Save