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
9c798b11
Commit
9c798b11
authored
11 years ago
by
Junegunn Choi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Python 2.4-incompatible 'with' statement
parent
828b9f87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
library/utilities/wait_for
+4
-1
No files found.
library/utilities/wait_for
View file @
9c798b11
...
@@ -157,7 +157,8 @@ def main():
...
@@ -157,7 +157,8 @@ def main():
while
datetime
.
datetime
.
now
()
<
end
:
while
datetime
.
datetime
.
now
()
<
end
:
if
path
:
if
path
:
try
:
try
:
with
open
(
path
)
as
f
:
f
=
open
(
path
)
try
:
if
search_regex
:
if
search_regex
:
if
re
.
search
(
search_regex
,
f
.
read
(),
re
.
MULTILINE
):
if
re
.
search
(
search_regex
,
f
.
read
(),
re
.
MULTILINE
):
break
break
...
@@ -165,6 +166,8 @@ def main():
...
@@ -165,6 +166,8 @@ def main():
time
.
sleep
(
1
)
time
.
sleep
(
1
)
else
:
else
:
break
break
finally
:
f
.
close
()
except
IOError
:
except
IOError
:
time
.
sleep
(
1
)
time
.
sleep
(
1
)
pass
pass
...
...
This diff is collapsed.
Click to expand it.
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