ansible/ansible — pull request #534 by davehatton (2012-07-04 11:32:45+00:00)
Title: switch to shutil.copy rather than os.system(cp)

this change was suggested on IRC

it switches from calling the cp command via os.system to using shutil.copy. It brings copy into line with ./lib/ansible/runner/connection/local.py

* added import for shutil
* fixes some indents that were tabs to be spaces
* alters error message for the directory exists check, to report the directory rather than the directory/filename
* uses shutil.copy rather than os.system(cp)