Skip to content

Commit

Permalink
disable stdout when invoking flow scripts (#763)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhongxiaYan authored and AboudyKreidieh committed Oct 26, 2019
1 parent 0a188f5 commit f174056
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions flow/core/kernel/network/traci.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ def generate_net(self,
' --output-file=' + self.cfg_path + self.netfn +
' --no-internal-links="false"'
],
stdout=subprocess.DEVNULL,
shell=True)

# collect data from the generated network configuration file
Expand Down
5 changes: 4 additions & 1 deletion flow/core/kernel/simulation/traci.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ def start_simulation(self, network, sim_params):

# Opening the I/O thread to SUMO
self.sumo_proc = subprocess.Popen(
sumo_call, preexec_fn=os.setsid)
sumo_call,
stdout=subprocess.DEVNULL,
preexec_fn=os.setsid
)

# wait a small period of time for the subprocess to activate
# before trying to connect with traci
Expand Down

0 comments on commit f174056

Please sign in to comment.