update WicdPlugin to py3

This commit is contained in:
Denis Fomin
2013-01-28 21:30:27 +04:00
parent 9c81c60373
commit 7bfb30269c
3 changed files with 4 additions and 5 deletions

View File

@@ -1 +1 @@
from wicd_support import WicdPlugin from .wicd_support import WicdPlugin

View File

@@ -6,4 +6,4 @@ description: Support for autodetection of network status for Wicd Network Manage
Requires wicd and python-dbus. Requires wicd and python-dbus.
authors = Denis Fomin <fominde@gmail.com> authors = Denis Fomin <fominde@gmail.com>
homepage = http://trac-plugins.gajim.org/wiki/WicdSupportPlugin homepage = http://trac-plugins.gajim.org/wiki/WicdSupportPlugin
max_gajim_version: 0.15.9 min_gajim_version: 0.15.10

View File

@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import gobject
from common import gajim from common import gajim
from plugins import GajimPlugin from plugins import GajimPlugin
@@ -55,12 +54,12 @@ class WicdPlugin(GajimPlugin):
#WIRED = 3 #WIRED = 3
#SUSPENDED = 4 #SUSPENDED = 4
if state == 2 or state == 3: if state == 2 or state == 3:
for connection in gajim.connections.itervalues(): for connection in gajim.connections.values():
if gajim.config.get_per('accounts', connection.name, if gajim.config.get_per('accounts', connection.name,
'listen_to_network_manager') and connection.time_to_reconnect: 'listen_to_network_manager') and connection.time_to_reconnect:
connection._reconnect() connection._reconnect()
else: else:
for connection in gajim.connections.itervalues(): for connection in gajim.connections.values():
if gajim.config.get_per('accounts', connection.name, if gajim.config.get_per('accounts', connection.name,
'listen_to_network_manager') and connection.connected > 1: 'listen_to_network_manager') and connection.connected > 1:
connection._disconnectedReconnCB() connection._disconnectedReconnCB()