aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageialinux-online.org>2015-09-12 20:52:51 +0200
committerPapoteur <papoteur@mageialinux-online.org>2015-09-12 20:52:51 +0200
commit7dc6f893276fd4f3452b9524459bf7f58c564936 (patch)
tree0d74e80c41e8e45e959e12a5028e68d4247e23ea
parent2857e3c4740c5bb6bbf0556fd60858c8637f7079 (diff)
downloadnet_monitor-7dc6f893276fd4f3452b9524459bf7f58c564936.tar
net_monitor-7dc6f893276fd4f3452b9524459bf7f58c564936.tar.gz
net_monitor-7dc6f893276fd4f3452b9524459bf7f58c564936.tar.bz2
net_monitor-7dc6f893276fd4f3452b9524459bf7f58c564936.tar.xz
net_monitor-7dc6f893276fd4f3452b9524459bf7f58c564936.zip
Manual adaptations for Python 3
-rw-r--r--src/monitor.py4
-rwxr-xr-xsrc/net_monitor2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/monitor.py b/src/monitor.py
index 3eede34..2bd72e6 100644
--- a/src/monitor.py
+++ b/src/monitor.py
@@ -16,7 +16,7 @@ import _native
# localization
import gettext
try:
- gettext.install("net_monitor", str=1)
+ gettext.install("net_monitor")
except IOError:
_ = str
@@ -160,7 +160,7 @@ class Monitor:
"""Check if device is wireless and get its details if necessary"""
try:
stats = {}
- if not os.path.isfile("/proc/net/wireless"):
+ if not os.path.isfile("/proc/net/wireless"):
return stats
with open("/proc/net/wireless") as fd:
ifaces = fd.readlines()[2:]
diff --git a/src/net_monitor b/src/net_monitor
index 911b032..f5c809a 100755
--- a/src/net_monitor
+++ b/src/net_monitor
@@ -29,7 +29,7 @@ import textwrap
import gettext
from functools import reduce
try:
- gettext.install("net_monitor", str=1)
+ gettext.install("net_monitor")
except IOError:
_ = str