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
Klaus Wölfel
slapos.core
Commits
0480fd2b
Commit
0480fd2b
authored
Oct 08, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use magic SlapPopen for promise
parent
e3ee5379
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+6
-3
No files found.
slapos/grid/slapgrid.py
View file @
0480fd2b
...
@@ -634,16 +634,19 @@ class Slapgrid(object):
...
@@ -634,16 +634,19 @@ class Slapgrid(object):
promise
=
os
.
path
.
basename
(
command
[
0
])
promise
=
os
.
path
.
basename
(
command
[
0
])
self
.
logger
.
info
(
"Checking promise %r."
,
promise
)
self
.
logger
.
info
(
"Checking promise %r."
,
promise
)
kw
=
dict
(
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
kw
=
dict
(
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
stdin
=
subprocess
.
PIPE
)
process_handler
=
Slap
Popen
(
command
,
process_handler
=
subprocess
.
Popen
(
command
,
preexec_fn
=
lambda
:
dropPrivileges
(
uid
,
gid
),
preexec_fn
=
lambda
:
dropPrivileges
(
uid
,
gid
),
cwd
=
cwd
,
cwd
=
cwd
,
env
=
{},
**
kw
)
env
=
{},
**
kw
)
process_handler
.
stdin
.
flush
()
process_handler
.
stdin
.
close
()
process_handler
.
stdin
=
None
time
.
sleep
(
self
.
promise_timeout
)
time
.
sleep
(
self
.
promise_timeout
)
if
process_handler
.
poll
()
is
None
:
if
process_handler
.
poll
()
is
None
:
process_handler
.
terminate
()
process_handler
.
terminate
()
raise
Slapgrid
.
PromiseError
(
"The promise %r timed out"
%
promise
)
raise
Slapgrid
.
PromiseError
(
"The promise %r timed out"
%
promise
)
...
...
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