diff --git a/files/patch.py b/files/patch.py index 46fefe86dd2..cd4b3130079 100644 --- a/files/patch.py +++ b/files/patch.py @@ -132,7 +132,7 @@ def main(): module.fail_json(msg="src %s doesn't exist or not readable" % (p.src)) if p.dest and not os.access(p.dest, W_OK): - module.fail_json(msg="dest %s doesn't exist or not writable" % (d.dest)) + module.fail_json(msg="dest %s doesn't exist or not writable" % (p.dest)) if p.basedir and not path.exists(p.basedir): module.fail_json(msg="basedir %s doesn't exist" % (p.basedir))