Ubuntu Pastebin

Paste from cjwatson at Thu, 26 Feb 2015 21:33:34 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
<cjwatson@amber ~ (master)>$ cat bin/lp-rescan-branch
#! /usr/bin/python

from optparse import OptionParser

from launchpadlib.launchpad import Launchpad

parser = OptionParser("Usage: %prog BRANCH")
_, args = parser.parse_args()

lp = Launchpad.login_with("lp-rescan-branch", "production", version="devel")

url = args[0]
if ":" not in url:
    url = "lp:%s" % url
branch = lp.branches.getByUrl(url=url)
branch.unscan(rescan=True)
Download as text