From 7dc6f893276fd4f3452b9524459bf7f58c564936 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 12 Sep 2015 20:52:51 +0200 Subject: Manual adaptations for Python 3 --- src/monitor.py | 4 ++-- src/net_monitor | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 -- cgit v1.2.1