Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
moodle_rebase10.1.2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Blinov
moodle_rebase10.1.2
Commits
7f64359e
Commit
7f64359e
authored
Jun 01, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use "with" keyword to open & close file.
parent
5db300f0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
slapos/recipe/agent/__init__.py
slapos/recipe/agent/__init__.py
+17
-18
No files found.
slapos/recipe/agent/__init__.py
View file @
7f64359e
...
@@ -84,7 +84,7 @@ class Recipe(BaseSlapRecipe, GenericSlapRecipe):
...
@@ -84,7 +84,7 @@ class Recipe(BaseSlapRecipe, GenericSlapRecipe):
configuration
.
write
(
open
(
configuration_path
,
"w"
))
configuration
.
write
(
open
(
configuration_path
,
"w"
))
agent_crond_path
=
os
.
path
.
join
(
crond
,
"agent"
)
agent_crond_path
=
os
.
path
.
join
(
crond
,
"agent"
)
agent_crond
=
open
(
agent_crond_path
,
"w"
)
with
open
(
agent_crond_path
,
"w"
)
as
agent_crond
:
agent_crond
.
write
(
"*/5 * * * * %s -S %s --pidfile=%s %s
\
n
"
%
(
agent_crond
.
write
(
"*/5 * * * * %s -S %s --pidfile=%s %s
\
n
"
%
(
self
.
options
[
"python_binary"
],
self
.
options
[
"python_binary"
],
self
.
options
[
"agent_binary"
],
self
.
options
[
"agent_binary"
],
...
@@ -101,7 +101,6 @@ class Recipe(BaseSlapRecipe, GenericSlapRecipe):
...
@@ -101,7 +101,6 @@ class Recipe(BaseSlapRecipe, GenericSlapRecipe):
self
.
options
[
"report_stop"
],
self
.
options
[
"report_stop"
],
configuration_path
,
configuration_path
,
))
))
agent_crond
.
close
()
return
self
.
path_list
+
[
configuration_path
,
key_filepath
,
cert_filepath
,
agent_crond_path
]
return
self
.
path_list
+
[
configuration_path
,
key_filepath
,
cert_filepath
,
agent_crond_path
]
...
...
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