projects
/
osm
/
vim-emu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef6629e
)
Ensure that ryu is killed
author
peusterm
<manuel.peuster@uni-paderborn.de>
Mon, 14 Mar 2016 16:40:43 +0000
(17:40 +0100)
committer
peusterm
<manuel.peuster@uni-paderborn.de>
Mon, 14 Mar 2016 16:40:43 +0000
(17:40 +0100)
src/emuvim/dcemulator/net.py
patch
|
blob
|
history
diff --git
a/src/emuvim/dcemulator/net.py
b/src/emuvim/dcemulator/net.py
index
bc54293
..
81d16ab
100755
(executable)
--- a/
src/emuvim/dcemulator/net.py
+++ b/
src/emuvim/dcemulator/net.py
@@
-154,9
+154,8
@@
class DCNetwork(Dockernet):
def stop(self):
# stop Ryu controller
- self.ryu_process.terminate()
- #self.ryu_process.kill()
Dockernet.stop(self)
+ self.stopRyu()
def CLI(self):
CLI(self)
@@
-217,4
+216,10
@@
class DCNetwork(Dockernet):
ryu_cmd = 'ryu-manager'
FNULL = open("/tmp/ryu.log", 'w')
self.ryu_process = Popen([ryu_cmd, ryu_path, ryu_path2, ryu_option, ryu_of_port], stdout=FNULL, stderr=FNULL)
- time.sleep(1)
\ No newline at end of file
+ time.sleep(1)
+
+ def stopRyu(self):
+ if self.ryu_process:
+ self.ryu_process.terminate()
+ self.ryu_process.kill()
+