Skip to content

Commit e8e47b5

Browse files
fix : minor edit in network_control function #35
1 parent 20be870 commit e8e47b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

orangetool/orangetool_ip.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,9 @@ def network_control(command, device="eth0", debug=False):
198198
cmd = "up"
199199
if command == "down":
200200
cmd = "down"
201-
output = sub.Popen(["ifconfig", device, cmd],
201+
cmd_out = sub.Popen(["ifconfig", device, cmd],
202202
stderr=sub.PIPE, stdin=sub.PIPE, stdout=sub.PIPE)
203+
output = list(cmd_out.communicate())
203204
if len(output[0]) == 0 and len(output[1]) == 0:
204205
return True
205206
return False

0 commit comments

Comments
 (0)