From c3db22d7f10340d267bb06dadd6133841388e8de Mon Sep 17 00:00:00 2001 From: spoob Date: Sun, 31 May 2009 19:43:53 +0200 Subject: xupi.in works again --- Core.py | 2 +- module/network/Request.py | 11 +++++++++-- pyMainGui.py | 2 -- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Core.py b/Core.py index b4761de76..fdec3a084 100644 --- a/Core.py +++ b/Core.py @@ -145,7 +145,7 @@ class Core(object): """ newst_version = urllib2.urlopen("http://pyload.nady.biz/files/version.txt").readline().strip() if CURRENT_VERSION < newst_version: - print _("new update %s on pyload.de.rw") % newst_version #newer version out + print _("new update %s on pyload.org") % newst_version #newer version out elif CURRENT_VERSION == newst_version: print _("newst version %s in use:") % CURRENT_VERSION #using newst version else: diff --git a/module/network/Request.py b/module/network/Request.py index 86449a4f2..196e350c9 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -90,11 +90,18 @@ class Request: #def download(url, filename, reporthook = None, data = None): #default von urlretrieve auch None? # return self.downloader.urlretrieve(url, filename, reporthook, data) - def download(self, url, filename): + def download(self, url, filename, post = {}): + + if post: + post = urllib.urlencode(post) + else: + post = None + if not self.dl: self.dl = True file = open(filename, 'wb') - req = urllib2.Request(url) + req = urllib2.Request(url, post) + conn = self.downloader.open(req) self.dl_size = int(conn.headers["content-length"]) self.dl_arrived = 0 diff --git a/pyMainGui.py b/pyMainGui.py index 10903433c..2a51fedd5 100755 --- a/pyMainGui.py +++ b/pyMainGui.py @@ -115,8 +115,6 @@ class Pyload_Main_Gui(wx.Frame): self.Bind(wx.EVT_MENU, self.exit_button_clicked, submenu_exit) self.Bind(wx.EVT_TOOL, self.add_button_clicked, add) - - self.Centre() self.Show(True) -- cgit v1.2.3