Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
6efc8008
Commit
6efc8008
authored
May 13, 2014
by
Henry Finucane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fail fast in the presence of permissions issues
parent
278ecb9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
library/utilities/wait_for
+9
-3
No files found.
library/utilities/wait_for
View file @
6efc8008
...
...
@@ -176,7 +176,8 @@ def main():
end
=
start
+
datetime
.
timedelta
(
seconds
=
timeout
)
while
datetime
.
datetime
.
now
()
<
end
:
if
path
:
if
os
.
path
.
exists
(
path
):
try
:
os
.
stat
(
path
)
if
search_regex
:
try
:
f
=
open
(
path
)
...
...
@@ -192,8 +193,13 @@ def main():
pass
else
:
break
else
:
time
.
sleep
(
1
)
except
OSError
,
e
:
# File not present
if
os
.
errno
==
2
:
time
.
sleep
(
1
)
else
:
elapsed
=
datetime
.
datetime
.
now
()
-
start
module
.
fail_json
(
msg
=
"Failed to stat
%
s,
%
s"
%
(
path
,
e
.
strerror
),
elapsed
=
elapsed
.
seconds
)
elif
port
:
s
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
s
.
settimeout
(
connect_timeout
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment