Merge lp:~blueyed/apport/bug532944-lucid into lp:~ubuntu-core-dev/ubuntu/lucid/apport/ubuntu

Proposed by Daniel Hahler
Status: Merged
Merge reported by: Martin Pitt
Merged at revision: not available
Proposed branch: lp:~blueyed/apport/bug532944-lucid
Merge into: lp:~ubuntu-core-dev/ubuntu/lucid/apport/ubuntu
Diff against target: 50 lines (+24/-1)
2 files modified
apport/ui.py (+16/-1)
debian/changelog (+8/-0)
To merge this branch: bzr merge lp:~blueyed/apport/bug532944-lucid
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Review via email: mp+20793@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Nice catch, thanks! Applied to trunk (r1717), thus I didn't merge your branch directly (it doesn't apply to trunk).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'apport/ui.py'
--- apport/ui.py 2010-02-22 20:54:14 +0000
+++ apport/ui.py 2010-03-05 23:32:21 +0000
@@ -604,7 +604,9 @@
604604
605 # no argument: default to "show pending crashes" except when called in605 # no argument: default to "show pending crashes" except when called in
606 # bug mode606 # bug mode
607 if len(self.args) == 0 and cmd.endswith('-bug'):607 # NOTE: uses sys.argv, since self.args if empty for all the options,
608 # e.g. "-v" or "-u $BUG"
609 if len(sys.argv) == 1 and cmd.endswith('-bug'):
608 self.options.filebug = True610 self.options.filebug = True
609 return611 return
610612
@@ -1624,6 +1626,19 @@
1624 self.assertEqual(self.ui.run_argv(), False)1626 self.assertEqual(self.ui.run_argv(), False)
1625 self.assertEqual(self.ui.msg_severity, 'error')1627 self.assertEqual(self.ui.msg_severity, 'error')
16261628
1629 def test_run_version(self):
1630 '''run_report_bug() as "ubuntu-bug" with version argument.
1631 (LP: #532944)'''
1632
1633 sys.argv = ['ubuntu-bug', '-v']
1634 self.ui = _TestSuiteUserInterface()
1635 orig_stdout = sys.stdout
1636 sys.stdout = StringIO()
1637 self.assertEqual(self.ui.run_argv(), True)
1638 output = sys.stdout.getvalue()
1639 sys.stdout = orig_stdout
1640 self.assertEqual(output, __version__+"\n")
1641
1627 def test_run_report_bug_package(self):1642 def test_run_report_bug_package(self):
1628 '''run_report_bug() for a package.'''1643 '''run_report_bug() for a package.'''
16291644
16301645
=== modified file 'debian/changelog'
--- debian/changelog 2010-03-05 21:52:39 +0000
+++ debian/changelog 2010-03-05 23:32:21 +0000
@@ -1,3 +1,11 @@
1apport (1.12.1-0ubuntu6) UNRELEASED; urgency=low
2
3 * apport/ui.py: use sys.argv instead of parsed self.args when
4 defaulting to self.options.filebug.
5 This makes "ubuntu-bug -v" and others work as expected. (LP: #532944)
6
7 -- Daniel Hahler <ubuntu@thequod.de> Sat, 06 Mar 2010 00:21:37 +0100
8
1apport (1.12.1-0ubuntu5) lucid; urgency=low9apport (1.12.1-0ubuntu5) lucid; urgency=low
210
3 * launchpad.py: Do not escalate a bug if its already been escalated and11 * launchpad.py: Do not escalate a bug if its already been escalated and

Subscribers

People subscribed via source and target branches

to all changes: