Skip to content
Snippets Groups Projects
Commit cbe335b2 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

keys() doesnt return list() in python3

parent 206b87d7
No related branches found
No related tags found
No related merge requests found
......@@ -89,7 +89,7 @@ def remove_service_callback(self, interface, protocol, name, stype, domain,
if not self.connected:
return
if name != self.name:
for key in self.contacts.keys(): # pylint: disable=C0201
for key in list(self.contacts.keys()):
val = self.contacts[key]
if val[Constant.BARE_NAME] == name:
# try to reduce instead of delete first
......
......@@ -98,7 +98,7 @@ def remove_service_callback(self, name):
if not self.connected:
return
if name != self.name:
for key in self.contacts.keys(): # pylint: disable=C0201
for key in list(self.contacts.keys()):
if self.contacts[key][Constant.NAME] == name:
del self.contacts[key]
self.remove_serviceCB(key)
......
......@@ -1107,7 +1107,7 @@ def _on_window_delete(self, win, event):
return False
def _on_window_destroy(self, win):
for k in self._windows.keys(): # pylint: disable=C0201
for k in list(self._windows.keys()):
if self._windows[k].window == win:
self.emit('window-delete', self._windows[k])
del self._windows[k]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment