1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

copy module fixes for 'make pep8'

This commit is contained in:
Michael DeHaan 2013-05-11 17:21:04 -04:00
parent 157f487bcd
commit 13d98f3977

View file

@ -144,9 +144,9 @@ def main():
os.unlink(dest) os.unlink(dest)
open(dest, 'w').close() open(dest, 'w').close()
if validate: if validate:
(rc,out,err) = module.run_command(validate % src) (rc,out,err) = module.run_command(validate % src)
if rc != 0: if rc != 0:
module.fail_json(msg="failed to validate: rc:%s error:%s" % (rc,err)) module.fail_json(msg="failed to validate: rc:%s error:%s" % (rc,err))
module.atomic_move(src, dest) module.atomic_move(src, dest)
except IOError: except IOError:
module.fail_json(msg="failed to copy: %s to %s" % (src, dest)) module.fail_json(msg="failed to copy: %s to %s" % (src, dest))