aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/net_monitor4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net_monitor b/src/net_monitor
index 1c347ed..fb3c834 100755
--- a/src/net_monitor
+++ b/src/net_monitor
@@ -11,6 +11,7 @@ from gi.repository import Pango
import gc
import os
+import subprocess
from stat import *
import datetime
import getopt
@@ -834,7 +835,8 @@ class MonitorGui:
# show summary if parameter is unknown
print("Unknown parameter %s, showing summary.." % type)
param="-s"
- data = os.popen("vnstati %s -o - -i %s" % (param, iface)).read()
+ pr = subprocess.Popen(("vnstati %s -o - -i %s" % (param, iface)).split(),stdout=subprocess.PIPE)
+ data, _ = pr.communicate()
loader = GdkPixbuf.PixbufLoader()
loader.write(data)
loader.close()