Merge lp://staging/keryx/unstable into lp://staging/keryx/stable

Proposed by mac9416
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/keryx/unstable
Merge into: lp://staging/keryx/stable
Diff against target: None lines
To merge this branch: bzr merge lp://staging/keryx/unstable
Reviewer Review Type Date Requested Status
Chris Oliver Approve
Review via email: mp+9396@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Chris Oliver (excid3) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/consts.py'
2--- lib/consts.py 2009-02-20 05:46:09 +0000
3+++ lib/consts.py 2009-07-28 20:34:54 +0000
4@@ -21,13 +21,13 @@
5
6 # Strings
7 appName = 'Keryx'
8-appVersion = '0.92'
9+appVersion = '0.92.2'
10 appNameShort = 'keryx'
11 appFileExt = '.keryx'
12 appComments = _('Bringing Updates Home.')
13 filterDesc = _('Keryx Project Files') + ' | (*' + appFileExt + ')'
14
15-authors = 'Chris Oliver\nBuran Ayuthia'
16+authors = 'Chris Oliver\nBuran Ayuthia\nmac9416'
17 email = 'excid3@gmail.com'
18 artists = 'Chris Oliver'
19 docwriters = 'Chris Oliver'
20@@ -65,9 +65,9 @@
21
22 # URLs
23 urlBug = 'https://bugs.launchpad.net/keryx'
24-urlDonate = 'http://keryx.betaserver.org/#donate'
25-urlHelp = 'http://keryx.betaserver.org/forum'
26-urlHomepage = 'http://keryx.betaserver.org'
27+urlDonate = 'tranhttp://keryxproject.org/donate'
28+urlHelp = 'http://keryxproject.org/forum'
29+urlHomepage = 'http://keryxproject.org'
30 urlTranslate = 'https://translations.launchpad.net/keryx'
31
32 columns = [(_("S"), 50), (_("Package Name"), 200), (_("Installed Version"), 200), (_("Latest Version"), 200), (_("Description"), 200)]
33
34=== modified file 'lib/wxkeryx/download.py'
35--- lib/wxkeryx/download.py 2009-02-20 05:51:02 +0000
36+++ lib/wxkeryx/download.py 2009-07-28 20:34:54 +0000
37@@ -79,7 +79,8 @@
38
39 def _resultProducer(self, jobID, abortEvent):
40 """Downloads the files in self.files"""
41- msg = _("Downloading ") + str(len(self.files)) + " " + _("file(s)") + "\n"
42+ self.numfiles = len(self.files)
43+ msg = _("Downloading ") + str(self.numfiles) + " " + _("file(s)") + "\n"
44 wx.CallAfter(self.LogMessage, msg)
45
46 success = True
47@@ -98,45 +99,51 @@
48 #TODO: Change this to file progress (move to self.progress)
49
50 self.curfile = end
51- try: # Attempt to download the file
52- msg = _("Downloading: ") + url + "\n"
53- wx.CallAfter(self.LogMessage, msg)
54+ 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
55+ try: # Attempt to download the file
56+ msg = _("Downloading: ") + url + "\n"
57+ wx.CallAfter(self.LogMessage, msg)
58
59- if consts.proxy_enabled:
60- if consts.http_proxy['http'][0:7] != 'http://':
61- proxy = {'http://':consts.http_proxy['http']}
62+ if consts.proxy_enabled:
63+ if consts.http_proxy['http'][0:7] != 'http://':
64+ proxy = {'http://':consts.http_proxy['http']}
65+ else:
66+ proxy = consts.http_proxy
67+ downloader = Downloader(proxy)
68 else:
69- proxy = consts.http_proxy
70- downloader = Downloader(proxy)
71- else:
72- downloader = Downloader()
73-
74- downloader.retrieve(url, file, self.progress)
75- #TODO: Generate md5hashes for these files
76-
77- msg = _("Extracting") + " " + end
78- wx.CallAfter(self.SetFile, msg)
79-
80- if self.extract:
81- try:
82- import gzip
83- infile = gzip.open(data[1], 'rb')
84- outfile = open(data[2], 'wb')
85- outfile.write(infile.read())
86- outfile.close()
87- infile.close()
88- os.remove(data[1])
89- except:
90- msg = _("Unable to extract: ") + data[1]
91- wx.CallAfter(self.LogMessage, msg)
92-
93- msg = _("Saved to: ") + file + "\n"
94- wx.CallAfter(self.LogMessage, msg)
95-
96- except IOError, e: # Failed downloading
97- success = False
98- msg = _("Failed: ") + url + "\n" + _("Reason: ") + str(e) + "\n"
99- wx.CallAfter(self.LogMessage, msg)
100+ downloader = Downloader()
101+
102+ downloader.retrieve(url, file, self.progress)
103+ #TODO: Generate md5hashes for these files
104+
105+ msg = _("Extracting") + " " + end
106+ wx.CallAfter(self.SetFile, msg)
107+
108+ if self.extract:
109+ try:
110+ import gzip
111+ infile = gzip.open(data[1], 'rb')
112+ outfile = open(data[2], 'wb')
113+ outfile.write(infile.read())
114+ outfile.close()
115+ infile.close()
116+ os.remove(data[1])
117+ except:
118+ msg = _("Unable to extract: ") + data[1]
119+ wx.CallAfter(self.LogMessage, msg)
120+
121+ msg = _("Success: ") + file + "\n"
122+ wx.CallAfter(self.LogMessage, msg)
123+
124+ except IOError, e: # Failed downloading
125+ success = False
126+ msg = _("Failed: ") + url + "\n" + _("Reason: ") + str(e) + "\n"
127+ wx.CallAfter(self.LogMessage, msg)
128+
129+ else:
130+ msg = _("Skipped: ") + url + "\n" + _("Reason: ") + "File already exists. Not necessarily a bad thing." + "\n"
131+ wx.CallAfter(self.LogMessage, msg)
132+
133
134 if success == True:
135 wx.CallAfter(self.DisplayMessage,_("All downloads have been completed successfully."), _("Download Complete"))
136@@ -151,7 +158,7 @@
137 else: fraction = float(blocks*size)/float(total)
138
139 wx.CallAfter(self.SetGauge, int(round(fraction*100,2)))
140- msg = self.curfile + "\n" + str(int(round(fraction*100,2))) + " % of " + lib.convert_file_size(total)
141+ msg = self.curfile + "\n" + str(int(round(fraction*100,2))) + " % of " + lib.convert_file_size(total) + " Total - " + str(self.numfiles)
142 wx.CallAfter(self.SetFile, msg)
143
144 def LogMessage(self, msg):

Subscribers

People subscribed via source and target branches