diff options
author | Papoteur <papoteur@mageialinux-online.org> | 2015-09-02 20:33:19 +0200 |
---|---|---|
committer | Papoteur <papoteur@mageialinux-online.org> | 2015-09-02 20:33:19 +0200 |
commit | 65d601995e975ac6c075f7dcb5da0a5de1fbee40 (patch) | |
tree | 729795cec11d6c97420fd58792df8280b979dd92 | |
parent | 32ccd77cd9b6d8e61a5cbbbdbd78a6b4ce174d21 (diff) | |
download | net_monitor-65d601995e975ac6c075f7dcb5da0a5de1fbee40.tar net_monitor-65d601995e975ac6c075f7dcb5da0a5de1fbee40.tar.gz net_monitor-65d601995e975ac6c075f7dcb5da0a5de1fbee40.tar.bz2 net_monitor-65d601995e975ac6c075f7dcb5da0a5de1fbee40.tar.xz net_monitor-65d601995e975ac6c075f7dcb5da0a5de1fbee40.zip |
Applying 2to3-3.4 conversion.
-rw-r--r-- | plasma/applet/contents/code/main.py | 2 | ||||
-rw-r--r-- | plasma/datasource/contents/code/main.py | 10 | ||||
-rw-r--r-- | src/monitor.py | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/plasma/applet/contents/code/main.py b/plasma/applet/contents/code/main.py index 4d2b44a..bb162b9 100644 --- a/plasma/applet/contents/code/main.py +++ b/plasma/applet/contents/code/main.py @@ -52,7 +52,7 @@ class NetMonitor(plasmascript.Applet): """Got something from data source""" iface = str(sourceName) if iface not in self.widgets: - print "Error: data for %s not available yet" % iface + print("Error: data for %s not available yet" % iface) return widget = self.widgets[iface] data_in = int(data[QString("data_in")]) diff --git a/plasma/datasource/contents/code/main.py b/plasma/datasource/contents/code/main.py index 8d9a8a2..2e0c115 100644 --- a/plasma/datasource/contents/code/main.py +++ b/plasma/datasource/contents/code/main.py @@ -30,9 +30,9 @@ class NetMonitorDataEngine(plasmascript.DataEngine): self.ifaces = self.monitor.readnet() self.enabled_ifaces = [] - self.wireless_ifaces = filter(self.monitor.has_wireless, self.ifaces.keys()) + self.wireless_ifaces = list(filter(self.monitor.has_wireless, list(self.ifaces.keys()))) - sorted_ifaces = self.ifaces.keys() + sorted_ifaces = list(self.ifaces.keys()) sorted_ifaces.sort() net=self.monitor.readnet() @@ -62,8 +62,8 @@ class NetMonitorDataEngine(plasmascript.DataEngine): def sources(self): """List of provided sources""" - sources = self.ifaces.keys() - print sources + sources = list(self.ifaces.keys()) + print(sources) return sources def sourceRequestEvent(self, name): @@ -73,7 +73,7 @@ class NetMonitorDataEngine(plasmascript.DataEngine): def updateSourceEvent(self, name): """Returns monitoring data""" - print "Getting info for %s " % name + print("Getting info for %s " % name) net=self.monitor.readnet() interval = 1 # update interval wifi_stats = self.monitor.wireless_stats() diff --git a/src/monitor.py b/src/monitor.py index 7c2ab8e..3eede34 100644 --- a/src/monitor.py +++ b/src/monitor.py @@ -16,7 +16,7 @@ import _native # localization import gettext try: - gettext.install("net_monitor", unicode=1) + gettext.install("net_monitor", str=1) except IOError: _ = str |