itervalues / iterkeys doesn't exist anymore
This commit is contained in:
parent
e03b3c35b6
commit
0312b6275a
|
@ -143,7 +143,7 @@ class CommandProcessor(object):
|
||||||
def list_commands(self):
|
def list_commands(self):
|
||||||
commands = list_commands(self.COMMAND_HOST)
|
commands = list_commands(self.COMMAND_HOST)
|
||||||
commands = dict(commands)
|
commands = dict(commands)
|
||||||
return sorted(set(commands.itervalues()))
|
return sorted(commands.values())
|
||||||
|
|
||||||
class Command(object):
|
class Command(object):
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ class StandardCommonCommands(CommandContainer):
|
||||||
def status(self, status, message):
|
def status(self, status, message):
|
||||||
if status not in ('online', 'away', 'chat', 'xa', 'dnd'):
|
if status not in ('online', 'away', 'chat', 'xa', 'dnd'):
|
||||||
raise CommandError("Invalid status given")
|
raise CommandError("Invalid status given")
|
||||||
for connection in gajim.connections.itervalues():
|
for connection in gajim.connections.values():
|
||||||
if not gajim.config.get_per('accounts', connection.name,
|
if not gajim.config.get_per('accounts', connection.name,
|
||||||
'sync_with_global_status'):
|
'sync_with_global_status'):
|
||||||
continue
|
continue
|
||||||
|
@ -149,7 +149,7 @@ class StandardCommonCommands(CommandContainer):
|
||||||
if not message:
|
if not message:
|
||||||
message = _("Away")
|
message = _("Away")
|
||||||
|
|
||||||
for connection in gajim.connections.itervalues():
|
for connection in gajim.connections.values():
|
||||||
if not gajim.config.get_per('accounts', connection.name,
|
if not gajim.config.get_per('accounts', connection.name,
|
||||||
'sync_with_global_status'):
|
'sync_with_global_status'):
|
||||||
continue
|
continue
|
||||||
|
@ -163,7 +163,7 @@ class StandardCommonCommands(CommandContainer):
|
||||||
if not message:
|
if not message:
|
||||||
message = _("Available")
|
message = _("Available")
|
||||||
|
|
||||||
for connection in gajim.connections.itervalues():
|
for connection in gajim.connections.values():
|
||||||
if not gajim.config.get_per('accounts', connection.name,
|
if not gajim.config.get_per('accounts', connection.name,
|
||||||
'sync_with_global_status'):
|
'sync_with_global_status'):
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -131,7 +131,7 @@ class ConfigPaths:
|
||||||
return default
|
return default
|
||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
for key in self.paths.iterkeys():
|
for key in self.paths.keys():
|
||||||
yield (key, self[key])
|
yield (key, self[key])
|
||||||
|
|
||||||
def init(self, root=None):
|
def init(self, root=None):
|
||||||
|
|
|
@ -270,7 +270,7 @@ class JingleSession(object):
|
||||||
"""
|
"""
|
||||||
Return True when all codecs and candidates are ready (for all contents)
|
Return True when all codecs and candidates are ready (for all contents)
|
||||||
"""
|
"""
|
||||||
return (any((content.is_ready() for content in self.contents.itervalues()))
|
return (any((content.is_ready() for content in self.contents.values()))
|
||||||
and self.accepted)
|
and self.accepted)
|
||||||
|
|
||||||
def accept_session(self):
|
def accept_session(self):
|
||||||
|
@ -589,7 +589,7 @@ class JingleSession(object):
|
||||||
"""
|
"""
|
||||||
Broadcast the stanza to all content handlers
|
Broadcast the stanza to all content handlers
|
||||||
"""
|
"""
|
||||||
for content in self.contents.itervalues():
|
for content in self.contents.values():
|
||||||
content.on_stanza(stanza, None, error, action)
|
content.on_stanza(stanza, None, error, action)
|
||||||
|
|
||||||
def __parse_contents(self, jingle):
|
def __parse_contents(self, jingle):
|
||||||
|
|
|
@ -327,7 +327,7 @@ class FileTransfersWindow:
|
||||||
dialog.set_default_response(Gtk.ResponseType.OK)
|
dialog.set_default_response(Gtk.ResponseType.OK)
|
||||||
|
|
||||||
desc_hbox = Gtk.HBox(False, 5)
|
desc_hbox = Gtk.HBox(False, 5)
|
||||||
desc_hbox.pack_start(Gtk.Label(_('Description: ', True, True, 0)), False, False, 0)
|
desc_hbox.pack_start(Gtk.Label(_('Description: ')), False, False, 0)
|
||||||
desc_hbox.pack_start(win, True, True, 0)
|
desc_hbox.pack_start(win, True, True, 0)
|
||||||
|
|
||||||
dialog.vbox.pack_start(desc_hbox, False, False, 0)
|
dialog.vbox.pack_start(desc_hbox, False, False, 0)
|
||||||
|
|
|
@ -29,7 +29,7 @@ def device_now_active(self, *args):
|
||||||
"""
|
"""
|
||||||
For Network Manager 0.6
|
For Network Manager 0.6
|
||||||
"""
|
"""
|
||||||
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()
|
||||||
|
@ -38,7 +38,7 @@ def device_no_longer_active(self, *args):
|
||||||
"""
|
"""
|
||||||
For Network Manager 0.6
|
For Network Manager 0.6
|
||||||
"""
|
"""
|
||||||
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()
|
||||||
|
@ -49,12 +49,12 @@ def state_changed(state):
|
||||||
"""
|
"""
|
||||||
nm_state = props.Get("org.freedesktop.NetworkManager", "State")
|
nm_state = props.Get("org.freedesktop.NetworkManager", "State")
|
||||||
if nm_state == 3 or nm_state == 70:
|
if nm_state == 3 or nm_state == 70:
|
||||||
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()
|
||||||
|
|
Loading…
Reference in New Issue