Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
Seminar-HFO
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
Seminar-HFO
Commits
e226996c
Commit
e226996c
authored
Feb 27, 2015
by
Matthew Hausknecht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Silenced the agents stderr.
parent
aa70c2bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
bin/Trainer.py
bin/Trainer.py
+4
-2
No files found.
bin/Trainer.py
View file @
e226996c
...
@@ -13,7 +13,7 @@ class DoneError(Exception):
...
@@ -13,7 +13,7 @@ class DoneError(Exception):
return
'Done due to
%
s'
%
self
.
msg
return
'Done due to
%
s'
%
self
.
msg
class
DummyPopen
(
object
):
class
DummyPopen
(
object
):
""" Emulates a Popen object. """
""" Emulates a Popen object
without actually starting a process
. """
def
__init__
(
self
,
pid
):
def
__init__
(
self
,
pid
):
self
.
pid
=
pid
self
.
pid
=
pid
def
poll
(
self
):
def
poll
(
self
):
...
@@ -94,7 +94,9 @@ class Trainer(object):
...
@@ -94,7 +94,9 @@ class Trainer(object):
self
.
_agentNumInt
)
self
.
_agentNumInt
)
agentCmd
=
'start_agent.sh -t
%
s -u
%
i'
%
(
self
.
_agentTeam
,
self
.
_agentNumExt
)
agentCmd
=
'start_agent.sh -t
%
s -u
%
i'
%
(
self
.
_agentTeam
,
self
.
_agentNumExt
)
agentCmd
=
agentCmd
.
split
(
' '
)
agentCmd
=
agentCmd
.
split
(
' '
)
p
=
subprocess
.
Popen
(
agentCmd
)
# Ignore stderr because librcsc continually prints to it
kwargs
=
{
'stderr'
:
open
(
'/dev/null'
,
'w'
)}
p
=
subprocess
.
Popen
(
agentCmd
,
**
kwargs
)
p
.
wait
()
p
.
wait
()
with
open
(
'/tmp/start
%
i'
%
p
.
pid
,
'r'
)
as
f
:
with
open
(
'/tmp/start
%
i'
%
p
.
pid
,
'r'
)
as
f
:
output
=
f
.
read
()
output
=
f
.
read
()
...
...
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