Merge lp:~smoser/ubuntu/lucid/apport/bug-486122 into lp:~ubuntu-core-dev/ubuntu/lucid/apport/ubuntu

Proposed by Scott Moser
Status: Merged
Merged at revision: 1734
Proposed branch: lp:~smoser/ubuntu/lucid/apport/bug-486122
Merge into: lp:~ubuntu-core-dev/ubuntu/lucid/apport/ubuntu
Diff against target: 72 lines (+20/-11)
1 file modified
bin/apport-cli (+20/-11)
To merge this branch: bzr merge lp:~smoser/ubuntu/lucid/apport/bug-486122
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Review via email: mp+21669@code.launchpad.net

Description of the change

Fix for bug 486122.

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

I applied your patch to trunk (r1734) with two tiny stylistic corrections, thanks a lot!

Thus I couldn't technically merge your branch, since it's not mergeable to trunk.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/apport-cli'
--- bin/apport-cli 2009-12-23 10:55:52 +0000
+++ bin/apport-cli 2010-03-18 19:22:25 +0000
@@ -189,22 +189,18 @@
189 # Fallback189 # Fallback
190 return 'cancel'190 return 'cancel'
191191
192 def ui_present_report_details(self, is_update):192 def ui_get_details(self):
193 if is_update:
194 dialog = CLIDialog (_('Send this data to the developers?'), None)
195 else:
196 dialog = CLIDialog (_('Send problem report to the developers?'),
197 _('After the problem report has been sent, please fill out the form in the\n'
198 'automatically opened web browser.'))
199
200 # report contents193 # report contents
201 details = ''194 details = ''
195 max_show = 1024 * 1024
202 for key in self.report:196 for key in self.report:
203 details += key + ':'197 details += key + ':'
204 # string value198 # string value
199 keylen = len(self.report[key])
205 if not hasattr(self.report[key], 'gzipvalue') and \200 if not hasattr(self.report[key], 'gzipvalue') and \
206 hasattr(self.report[key], 'isspace') and \201 hasattr(self.report[key], 'isspace') and \
207 not self.report._is_binary(self.report[key]):202 not self.report._is_binary(self.report[key]) and \
203 keylen < max_show:
208 lines = self.report[key].splitlines()204 lines = self.report[key].splitlines()
209 if len(lines) <= 1:205 if len(lines) <= 1:
210 details += ' ' + self.report[key] + '\n'206 details += ' ' + self.report[key] + '\n'
@@ -212,9 +208,22 @@
212 details += '\n'208 details += '\n'
213 for line in lines:209 for line in lines:
214 details += ' ' + line + '\n'210 details += ' ' + line + '\n'
211 elif keylen >= max_show:
212 details += ' ' + (_('(%s bytes)') % keylen ) + '\n'
215 else:213 else:
216 details += ' ' + _('(binary data)') + '\n'214 details += ' ' + _('(binary data)') + '\n'
217215
216 return details
217
218
219 def ui_present_report_details(self, is_update):
220 if is_update:
221 dialog = CLIDialog (_('Send this data to the developers?'), None)
222 else:
223 dialog = CLIDialog (_('Send problem report to the developers?'),
224 _('After the problem report has been sent, please fill out the form in the\n'
225 'automatically opened web browser.'))
226
218 # complete/reduced reports227 # complete/reduced reports
219 if self.report.has_key('CoreDump') and self.report.has_useful_stacktrace():228 if self.report.has_key('CoreDump') and self.report.has_useful_stacktrace():
220 complete = dialog.addbutton(_('&Send complete report (recommended; %s)') %229 complete = dialog.addbutton(_('&Send complete report (recommended; %s)') %
@@ -242,7 +251,7 @@
242 try:251 try:
243 subprocess.Popen(["/usr/bin/sensible-pager"],252 subprocess.Popen(["/usr/bin/sensible-pager"],
244 stdin=subprocess.PIPE,253 stdin=subprocess.PIPE,
245 close_fds=True).communicate(details)254 close_fds=True).communicate(self.ui_get_details())
246 except IOError, e:255 except IOError, e:
247 # ignore broken pipe (premature quit)256 # ignore broken pipe (premature quit)
248 if e.errno == errno.EPIPE:257 if e.errno == errno.EPIPE:
@@ -396,7 +405,7 @@
396 _('You can launch a browser now, or copy this URL into a browser on another computer.'))405 _('You can launch a browser now, or copy this URL into a browser on another computer.'))
397406
398 answer = self.ui_question_choice(text, [_('Launch a browser now')], False)407 answer = self.ui_question_choice(text, [_('Launch a browser now')], False)
399 if answer == [0]:408 if answer == [0]:
400 apport.ui.UserInterface.open_url(self, url)409 apport.ui.UserInterface.open_url(self, url)
401410
402if __name__ == '__main__':411if __name__ == '__main__':

Subscribers

People subscribed via source and target branches

to all changes: