mirror of
https://github.com/ansible/ansible.git
synced 2026-07-28 08:05:22 +02:00
(cherry picked from commit d772fe65b7)
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- wait_for - use ``errno.ENOENT`` symbolic constant instead of hardcoded value for improved code portability.
|
||||
@@ -581,7 +581,7 @@ def main():
|
||||
os.stat(b_path)
|
||||
except OSError as e:
|
||||
# If anything except file not present, throw an error
|
||||
if e.errno != 2:
|
||||
if e.errno != errno.ENOENT:
|
||||
elapsed = datetime.now(timezone.utc) - start
|
||||
module.fail_json(msg=msg or "Failed to stat %s, %s" % (path, e.strerror), elapsed=elapsed.seconds)
|
||||
# file doesn't exist yet, so continue
|
||||
|
||||
Reference in New Issue
Block a user