keryx team mailing list archive
-
keryx team
-
Mailing list archive
-
Message #00061
[Merge] lp:~mac9416/keryx/trunk into lp:keryx
mac9416 has proposed merging lp:~mac9416/keryx/trunk into lp:keryx.
Requested reviews:
Chris Oliver (excid3)
--
https://code.launchpad.net/~mac9416/keryx/trunk/+merge/9396
Your team Keryx Development Team is subscribed to branch lp:keryx.
=== modified file 'lib/consts.py'
--- lib/consts.py 2009-02-20 05:46:09 +0000
+++ lib/consts.py 2009-07-28 20:34:54 +0000
@@ -21,13 +21,13 @@
# Strings
appName = 'Keryx'
-appVersion = '0.92'
+appVersion = '0.92.2'
appNameShort = 'keryx'
appFileExt = '.keryx'
appComments = _('Bringing Updates Home.')
filterDesc = _('Keryx Project Files') + ' | (*' + appFileExt + ')'
-authors = 'Chris Oliver\nBuran Ayuthia'
+authors = 'Chris Oliver\nBuran Ayuthia\nmac9416'
email = 'excid3@xxxxxxxxx'
artists = 'Chris Oliver'
docwriters = 'Chris Oliver'
@@ -65,9 +65,9 @@
# URLs
urlBug = 'https://bugs.launchpad.net/keryx'
-urlDonate = 'http://keryx.betaserver.org/#donate'
-urlHelp = 'http://keryx.betaserver.org/forum'
-urlHomepage = 'http://keryx.betaserver.org'
+urlDonate = 'tranhttp://keryxproject.org/donate'
+urlHelp = 'http://keryxproject.org/forum'
+urlHomepage = 'http://keryxproject.org'
urlTranslate = 'https://translations.launchpad.net/keryx'
columns = [(_("S"), 50), (_("Package Name"), 200), (_("Installed Version"), 200), (_("Latest Version"), 200), (_("Description"), 200)]
=== modified file 'lib/wxkeryx/download.py'
--- lib/wxkeryx/download.py 2009-02-20 05:51:02 +0000
+++ lib/wxkeryx/download.py 2009-07-28 20:34:54 +0000
@@ -79,7 +79,8 @@
def _resultProducer(self, jobID, abortEvent):
"""Downloads the files in self.files"""
- msg = _("Downloading ") + str(len(self.files)) + " " + _("file(s)") + "\n"
+ self.numfiles = len(self.files)
+ msg = _("Downloading ") + str(self.numfiles) + " " + _("file(s)") + "\n"
wx.CallAfter(self.LogMessage, msg)
success = True
@@ -98,45 +99,51 @@
#TODO: Change this to file progress (move to self.progress)
self.curfile = end
- try: # Attempt to download the file
- msg = _("Downloading: ") + url + "\n"
- wx.CallAfter(self.LogMessage, msg)
+ if (url[-3:] == "deb" and (not os.path.exists(file))) or (url[-3:] != "deb"): # Download only deb files that don't exist but still all gz files
+ try: # Attempt to download the file
+ msg = _("Downloading: ") + url + "\n"
+ wx.CallAfter(self.LogMessage, msg)
- if consts.proxy_enabled:
- if consts.http_proxy['http'][0:7] != 'http://':
- proxy = {'http://':consts.http_proxy['http']}
+ if consts.proxy_enabled:
+ if consts.http_proxy['http'][0:7] != 'http://':
+ proxy = {'http://':consts.http_proxy['http']}
+ else:
+ proxy = consts.http_proxy
+ downloader = Downloader(proxy)
else:
- proxy = consts.http_proxy
- downloader = Downloader(proxy)
- else:
- downloader = Downloader()
-
- downloader.retrieve(url, file, self.progress)
- #TODO: Generate md5hashes for these files
-
- msg = _("Extracting") + " " + end
- wx.CallAfter(self.SetFile, msg)
-
- if self.extract:
- try:
- import gzip
- infile = gzip.open(data[1], 'rb')
- outfile = open(data[2], 'wb')
- outfile.write(infile.read())
- outfile.close()
- infile.close()
- os.remove(data[1])
- except:
- msg = _("Unable to extract: ") + data[1]
- wx.CallAfter(self.LogMessage, msg)
-
- msg = _("Saved to: ") + file + "\n"
- wx.CallAfter(self.LogMessage, msg)
-
- except IOError, e: # Failed downloading
- success = False
- msg = _("Failed: ") + url + "\n" + _("Reason: ") + str(e) + "\n"
- wx.CallAfter(self.LogMessage, msg)
+ downloader = Downloader()
+
+ downloader.retrieve(url, file, self.progress)
+ #TODO: Generate md5hashes for these files
+
+ msg = _("Extracting") + " " + end
+ wx.CallAfter(self.SetFile, msg)
+
+ if self.extract:
+ try:
+ import gzip
+ infile = gzip.open(data[1], 'rb')
+ outfile = open(data[2], 'wb')
+ outfile.write(infile.read())
+ outfile.close()
+ infile.close()
+ os.remove(data[1])
+ except:
+ msg = _("Unable to extract: ") + data[1]
+ wx.CallAfter(self.LogMessage, msg)
+
+ msg = _("Success: ") + file + "\n"
+ wx.CallAfter(self.LogMessage, msg)
+
+ except IOError, e: # Failed downloading
+ success = False
+ msg = _("Failed: ") + url + "\n" + _("Reason: ") + str(e) + "\n"
+ wx.CallAfter(self.LogMessage, msg)
+
+ else:
+ msg = _("Skipped: ") + url + "\n" + _("Reason: ") + "File already exists. Not necessarily a bad thing." + "\n"
+ wx.CallAfter(self.LogMessage, msg)
+
if success == True:
wx.CallAfter(self.DisplayMessage,_("All downloads have been completed successfully."), _("Download Complete"))
@@ -151,7 +158,7 @@
else: fraction = float(blocks*size)/float(total)
wx.CallAfter(self.SetGauge, int(round(fraction*100,2)))
- msg = self.curfile + "\n" + str(int(round(fraction*100,2))) + " % of " + lib.convert_file_size(total)
+ msg = self.curfile + "\n" + str(int(round(fraction*100,2))) + " % of " + lib.convert_file_size(total) + " Total - " + str(self.numfiles)
wx.CallAfter(self.SetFile, msg)
def LogMessage(self, msg):
Follow ups