From 137bb7fd2f4162ea68a81c8d782c6e628a5b27e3 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 18 Jun 2009 00:03:11 +0200 Subject: fixed disconnecting --- Plugins/Plugin.py | 2 +- pyLoadGui.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugins/Plugin.py b/Plugins/Plugin.py index adcaa7678..f43172b55 100644 --- a/Plugins/Plugin.py +++ b/Plugins/Plugin.py @@ -76,7 +76,7 @@ class Plugin(): self.config[option] = False if self.config[option].lower() == 'false' else self.config[option] def init_ocr(self): - modul = __import__("captcha."+ self.props['name']) + modul = __import__(self.props['name'], fromlist=['plugins']) captchaClass = getattr(modul, self.props['name']) self.ocr = captchaClass() diff --git a/pyLoadGui.py b/pyLoadGui.py index 422d5bd19..07480b5fb 100755 --- a/pyLoadGui.py +++ b/pyLoadGui.py @@ -193,7 +193,7 @@ class Pyload_Main_Gui(wx.Frame): wx.MessageDialog(None, 'Cant connect to: %s:%s' % (socket_host.host.GetValue(), socket_host.port.GetValue()), 'Error', wx.OK | wx.ICON_ERROR).ShowModal() def disconnect(self, event): - self.thread.socket.shutdown(socket.SHUT_RDWR) + self.thread.socket.close_when_done() self.SetStatusText('') @@ -228,4 +228,4 @@ class Pyload_Main_Gui(wx.Frame): app = wx.App() Pyload_Main_Gui(None, -1) -app.MainLoop() \ No newline at end of file +app.MainLoop() -- cgit v1.2.3