Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Arnaud Véron
slapos.core
Commits
301bd38b
Commit
301bd38b
authored
Jul 27, 2011
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor: just some PEP 8 compatibility fixes
parent
8e0369a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+11
-8
No files found.
slapos/grid/slapgrid.py
View file @
301bd38b
...
...
@@ -527,16 +527,17 @@ class Slapgrid(object):
failed_script_list
=
[]
commands_to_run
=
[
(
os
.
path
.
join
(
instance_path
,
'etc'
,
'report'
,
script
),
commands_to_run
=
[
(
os
.
path
.
join
(
instance_path
,
'etc'
,
'report'
,
script
),
path_to_slapreport
,
)
for
script
in
script_list_to_run
]
cwd
=
os
.
path
.
join
(
instance_path
,
'etc'
,
'report'
)
for
process_handler
,
command
in
self
.
_runCommandAsUserAndYieldPopen
(
commands_to_run
,
(
uid
,
gid
)
,
cwd
):
for
process_handler
,
command
in
\
self
.
_runCommandAsUserAndYieldPopen
(
commands_to_run
,
(
uid
,
gid
),
cwd
):
result
=
process_handler
.
communicate
()[
0
]
if
self
.
console
:
...
...
@@ -545,7 +546,8 @@ class Slapgrid(object):
process_handler
.
kill
()
if
process_handler
.
returncode
!=
0
:
clean_run
=
False
failed_script_list
.
append
(
"Script %r failed with %s."
%
(
script
,
result
))
failed_script_list
.
append
(
"Script %r failed with %s."
%
(
script
,
result
))
logger
.
warning
(
"Failed to run %r, the result was.
\
n
%s"
%
(
command
,
result
))
if
len
(
failed_script_list
):
...
...
@@ -561,9 +563,10 @@ class Slapgrid(object):
cwd
=
instance_path
# Check whether every promise is kept
for
process_handler
,
command
in
self
.
_runCommandAsUserAndYieldPopen
(
commands_to_run
,
(
uid
,
gid
),
cwd
):
for
process_handler
,
command
in
\
self
.
_runCommandAsUserAndYieldPopen
(
commands_to_run
,
(
uid
,
gid
),
cwd
):
time
.
sleep
(
3
)
# 3 seconds timeout
promise
=
os
.
path
.
basename
(
command
)
...
...
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