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
Gabriel Monnerat
slapos.core
Commits
8b829033
Commit
8b829033
authored
Oct 29, 2014
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
print promise names without u''
parent
685dc433
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+4
-4
No files found.
slapos/grid/slapgrid.py
View file @
8b829033
...
@@ -517,7 +517,7 @@ class Slapgrid(object):
...
@@ -517,7 +517,7 @@ class Slapgrid(object):
command
=
[
os
.
path
.
join
(
promise_dir
,
promise
)]
command
=
[
os
.
path
.
join
(
promise_dir
,
promise
)]
promise
=
os
.
path
.
basename
(
command
[
0
])
promise
=
os
.
path
.
basename
(
command
[
0
])
self
.
logger
.
info
(
"Checking promise
%r
."
,
promise
)
self
.
logger
.
info
(
"Checking promise
'%s'
."
,
promise
)
process_handler
=
subprocess
.
Popen
(
command
,
process_handler
=
subprocess
.
Popen
(
command
,
preexec_fn
=
lambda
:
dropPrivileges
(
uid
,
gid
,
logger
=
self
.
logger
),
preexec_fn
=
lambda
:
dropPrivileges
(
uid
,
gid
,
logger
=
self
.
logger
),
...
@@ -534,13 +534,13 @@ class Slapgrid(object):
...
@@ -534,13 +534,13 @@ class Slapgrid(object):
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
'%s'
timed out"
%
promise
)
elif
process_handler
.
poll
()
!=
0
:
elif
process_handler
.
poll
()
!=
0
:
stderr
=
process_handler
.
communicate
()[
1
]
stderr
=
process_handler
.
communicate
()[
1
]
if
stderr
is
None
:
if
stderr
is
None
:
stderr
=
'No error output from %r.'
%
promise
stderr
=
"No error output from '%s'."
%
promise
else
:
else
:
stderr
=
'Promise %r:'
%
promise
+
stderr
stderr
=
"Promise '%s':"
%
promise
+
stderr
raise
Slapgrid
.
PromiseError
(
stderr
)
raise
Slapgrid
.
PromiseError
(
stderr
)
if
not
promise_present
:
if
not
promise_present
:
...
...
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