aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.com>2010-03-01 17:20:57 -0300
committerEugeni Dodonov <eugeni@mandriva.com>2010-03-01 17:20:57 -0300
commitb9557f67d1c6be2cdc90d9e1ab09eacf318660d7 (patch)
treeab92deb77cb66f5312fc59bb353277ae49b9ba88 /src
parent603a1fdc58ed1b0b24a94847724c14adfaeba3a3 (diff)
downloadnet_monitor-b9557f67d1c6be2cdc90d9e1ab09eacf318660d7.tar
net_monitor-b9557f67d1c6be2cdc90d9e1ab09eacf318660d7.tar.gz
net_monitor-b9557f67d1c6be2cdc90d9e1ab09eacf318660d7.tar.bz2
net_monitor-b9557f67d1c6be2cdc90d9e1ab09eacf318660d7.tar.xz
net_monitor-b9557f67d1c6be2cdc90d9e1ab09eacf318660d7.zip
added missing comments
Diffstat (limited to 'src')
-rw-r--r--src/monitor.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/monitor.py b/src/monitor.py
index fde405b..72408b3 100644
--- a/src/monitor.py
+++ b/src/monitor.py
@@ -89,6 +89,7 @@ class Monitor:
return 0
def get_status(self, ifname):
+ """Determines interface status"""
try:
with open("/sys/class/net/%s/operstate" % ifname) as fd:
status = fd.readline().strip()
@@ -125,6 +126,7 @@ class Monitor:
return os.access("/sys/class/net/%s/wireless" % iface, os.R_OK)
def get_address(self, ifname):
+ """Get MAC address of a card"""
mac=_("No physical address")
# ip address
try:
@@ -157,6 +159,7 @@ class Monitor:
return net
def get_traffic(self, iface, net=None):
+ """Get traffic information"""
if not net:
if not self.net:
self.readnet()