Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
pipelet
Pipelet
Commits
185a8a66
Commit
185a8a66
authored
Mar 20, 2014
by
Betoule Marc
Browse files
add a nice feature to logged_subprocess
parent
2c9e893e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
pipelet/environment.py
pipelet/environment.py
+3
-2
No files found.
pipelet/environment.py
View file @
185a8a66
...
...
@@ -323,7 +323,7 @@ class Environment(EnvironmentBase):
+
glob
(
path
.
join
(
self
.
_worker
.
pipe
.
get_data_dir
(
segx
),
path
.
join
(
'*/'
,
y
)))
def
logged_subprocess
(
self
,
args
,
shell
=
False
,
except_on_failure
=
True
,
name
=
None
):
def
logged_subprocess
(
self
,
args
,
shell
=
False
,
except_on_failure
=
True
,
name
=
None
,
of
=
None
):
""" Execute a subprocess and log its output.
Create files process_name.log and process_name.err
...
...
@@ -341,7 +341,8 @@ class Environment(EnvironmentBase):
proc
=
args
[
0
]
if
name
is
None
:
name
=
path
.
basename
(
proc
)
of
=
self
.
get_data_fn
(
name
+
'.log'
)
if
of
is
None
:
of
=
self
.
get_data_fn
(
name
+
'.log'
)
ef
=
self
.
get_data_fn
(
name
+
'.err'
)
o
=
file
(
of
,
'w'
)
e
=
file
(
ef
,
'w'
)
...
...
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