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

Import errno to avoid 'NameError: global name 'errno' is not defined'

I hit the following exception because errno is referenced but not imported.

```
fatal: [system01] => failed to parse: Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-1354644532.37-246102819320352/copy", line 782, in <module>
    main()
  File "/root/.ansible/tmp/ansible-1354644532.37-246102819320352/copy", line 117, in main
    module.atomic_replace(dest_tmp, dest)
  File "/root/.ansible/tmp/ansible-1354644532.37-246102819320352/copy", line 772, in atomic_replace
    if e.errno != errno.EPERM:
NameError: global name 'errno' is not defined
```
This commit is contained in:
Dag Wieers 2012-12-04 19:27:22 +01:00
parent dbf5a57a5a
commit dd4ac46397

View file

@ -56,6 +56,7 @@ import stat
import grp
import pwd
import platform
import errno
HAVE_SELINUX=False
try: