Remove unused code

This commit is contained in:
Philipp Hörist 2017-12-29 19:08:05 +01:00
parent 1d835fbfd7
commit 361ad92b26
2 changed files with 4 additions and 14 deletions

View File

@ -20,18 +20,12 @@
import sys
import logging
import functools
log = logging.getLogger('gajim.c.resolver')
if __name__ == '__main__':
sys.path.append('../..')
from gajim.common import i18n
from gajim.common import configpaths
configpaths.gajimpaths.init(None)
from gi.repository import Gio, GLib
log = logging.getLogger('gajim.c.resolver')
def get_resolver(idlequeue):
def get_resolver():
return GioResolver()
@ -141,10 +135,7 @@ class GioResolver(CommonResolver):
# below lines is on how to use API and assist in testing
if __name__ == '__main__':
from gi.repository import Gtk
from nbxmpp import idlequeue
idlequeue = idlequeue.get_idlequeue()
resolver = get_resolver(idlequeue)
resolver = get_resolver()
def clicked(widget):
global resolver
@ -165,5 +156,4 @@ if __name__ == '__main__':
but.connect('clicked', clicked)
win.add(hbox)
win.show_all()
GLib.timeout_add(200, idlequeue.process)
Gtk.main()

View File

@ -2773,7 +2773,7 @@ class Interface:
app.idlequeue = idlequeue.get_idlequeue()
# resolve and keep current record of resolved hosts
app.resolver = resolver.get_resolver(app.idlequeue)
app.resolver = resolver.get_resolver()
app.socks5queue = socks5.SocksQueue(app.idlequeue,
self.handle_event_file_rcv_completed,
self.handle_event_file_progress,