Merge lp:~blueyed/apport/bug532944 into lp:~apport-hackers/apport/trunk

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

This was merged a long time ago already.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS'
--- NEWS 2010-03-05 15:48:31 +0000
+++ NEWS 2010-03-05 23:27:20 +0000
@@ -11,6 +11,7 @@
11Bug fixes:11Bug fixes:
12 - Fix --help output for bug updating mode (invocation as apport-collect or12 - Fix --help output for bug updating mode (invocation as apport-collect or
13 apport-update-bug). (LP: #504116)13 apport-update-bug). (LP: #504116)
14 - Fix argument/options handling for "ubuntu-bug" (LP: #532944)
1415
151.12.1 (2010-02-22)161.12.1 (2010-02-22)
16-------------------17-------------------
1718
=== modified file 'apport/ui.py'
--- apport/ui.py 2010-03-05 15:48:31 +0000
+++ apport/ui.py 2010-03-05 23:27:20 +0000
@@ -619,7 +619,9 @@
619619
620 # no argument: default to "show pending crashes" except when called in620 # no argument: default to "show pending crashes" except when called in
621 # bug mode621 # bug mode
622 if len(self.args) == 0 and cmd.endswith('-bug'):622 # NOTE: uses sys.argv, since self.args if empty for all the options,
623 # e.g. "-v" or "-u $BUG"
624 if len(sys.argv) == 1 and cmd.endswith('-bug'):
623 self.options.filebug = True625 self.options.filebug = True
624 return626 return
625627
@@ -1639,6 +1641,19 @@
1639 self.assertEqual(self.ui.run_argv(), False)1641 self.assertEqual(self.ui.run_argv(), False)
1640 self.assertEqual(self.ui.msg_severity, 'error')1642 self.assertEqual(self.ui.msg_severity, 'error')
16411643
1644 def test_run_version(self):
1645 '''run_report_bug() as "ubuntu-bug" with version argument.
1646 (LP: #532944)'''
1647
1648 sys.argv = ['ubuntu-bug', '-v']
1649 self.ui = _TestSuiteUserInterface()
1650 orig_stdout = sys.stdout
1651 sys.stdout = StringIO()
1652 self.assertEqual(self.ui.run_argv(), True)
1653 output = sys.stdout.getvalue()
1654 sys.stdout = orig_stdout
1655 self.assertEqual(output, __version__+"\n")
1656
1642 def test_run_report_bug_package(self):1657 def test_run_report_bug_package(self):
1643 '''run_report_bug() for a package.'''1658 '''run_report_bug() for a package.'''
16441659

Subscribers

People subscribed via source and target branches