mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 07:01:22 -07:00
Convert the whole files/ directory to py3 syntax (#3685)
This commit is contained in:
parent
0027158b74
commit
f7b29ba8fd
7 changed files with 36 additions and 18 deletions
|
@ -291,7 +291,8 @@ def main():
|
|||
# the execute bit for the current user set, in
|
||||
# which case the stat() call will raise an OSError
|
||||
os.stat(os.path.dirname(dest))
|
||||
except OSError, e:
|
||||
except OSError:
|
||||
e = get_exception()
|
||||
if "permission denied" in str(e).lower():
|
||||
module.fail_json(msg="Destination directory %s is not accessible" % (os.path.dirname(dest)))
|
||||
module.fail_json(msg="Destination directory %s does not exist" % (os.path.dirname(dest)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue