Merge lp:~brian-murray/ubuntu-archive-tools/open-all-bugs into lp:ubuntu-archive-tools

Proposed by Brian Murray
Status: Merged
Merged at revision: 1066
Proposed branch: lp:~brian-murray/ubuntu-archive-tools/open-all-bugs
Merge into: lp:ubuntu-archive-tools
Diff against target: 29 lines (+5/-0)
1 file modified
sru-review (+5/-0)
To merge this branch: bzr merge lp:~brian-murray/ubuntu-archive-tools/open-all-bugs
Reviewer Review Type Date Requested Status
Ubuntu Package Archive Administrators Pending
Review via email: mp+312312@code.launchpad.net

Description of the change

I'd frequently get an error message from Firefox about it already being running when I was using sru-review. Adding this sleep fixes it for me. I'd have rather passed webbrowser.open() a list but it doesn't seem to work that way.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sru-review'
2--- sru-review 2016-11-07 18:25:26 +0000
3+++ sru-review 2016-12-02 00:12:45 +0000
4@@ -44,6 +44,7 @@
5 import webbrowser
6
7 from launchpadlib.launchpad import Launchpad
8+from time import sleep
9
10
11 def parse_options():
12@@ -65,6 +66,9 @@
13 "-b", "--browser", dest="browser", action="store_true",
14 default=True, help="Open Launchpad bugs in browser")
15 parser.add_option(
16+ "--no-browser", dest="browser", action="store_false",
17+ default=True, help="Don't open Launchpad bugs in browser")
18+ parser.add_option(
19 "-v", "--view", dest="view", action="store_true",
20 default=True, help="View debdiff in pager")
21 parser.add_option(
22@@ -422,6 +426,7 @@
23 # use a full url so the right task is highlighted
24 webbrowser.open('https://bugs.launchpad.net/ubuntu/+source/'
25 '%s/+bug/%s' % (sourcepkg, b))
26+ sleep(1)
27 # also open the source package page to review version numbers
28 if opts.browser:
29 webbrowser.open('https://launchpad.net/ubuntu/+source/'

Subscribers

People subscribed via source and target branches