mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 15:41:09 +00:00
* common.py: Improve wording.
* massfile and pull-lp-source: Point to https Launchpad links.
This commit is contained in:
parent
13ccb17ef5
commit
3af0c337cc
10
common.py
10
common.py
@ -86,23 +86,23 @@ def checkSourceExists(package, release):
|
||||
m = re.search('"/ubuntu/%s/\+source/%s/(\d[^"]+)"' % (release,
|
||||
package.replace('+', '\+')), page)
|
||||
if not m:
|
||||
print >> sys.stderr, "Unable to find this source package (%s) in " \
|
||||
"this release (%s)." % (package, release.capitalize())
|
||||
print >> sys.stderr, "Unable to find this source package '%s' in " \
|
||||
"the %s release." % (package, release.capitalize())
|
||||
sys.exit(1)
|
||||
|
||||
except urllib2.HTTPError, error: # Raised on 404.
|
||||
if error.code == 404:
|
||||
print >> sys.stderr, "The source package (%s) does not appear to " \
|
||||
print >> sys.stderr, "The source package '%s' does not appear to " \
|
||||
"exist in Ubuntu." % package
|
||||
else: # Other error code, probably Launchpad malfunction.
|
||||
print >> sys.stderr, "Error when checking Launchpad for package: " \
|
||||
print >> sys.stderr, "Error while checking Launchpad for package: " \
|
||||
"%s." % error.code
|
||||
|
||||
sys.exit(1) # Exit. Error encountered.
|
||||
|
||||
except urllib2.URLError, error: # Other error (NXDOMAIN, ...)
|
||||
(_, reason) = error.reason
|
||||
print >> sys.stderr, "Error when checking Launchpad for package: %s." % \
|
||||
print >> sys.stderr, "Error while checking Launchpad for package: %s." % \
|
||||
reason
|
||||
sys.exit(1)
|
||||
|
||||
|
2
massfile
2
massfile
@ -99,7 +99,7 @@ def file_bug(config):
|
||||
"target": "ubuntu"},
|
||||
summary=summary,
|
||||
description=description)
|
||||
print "Successfully filed bug %s: http://launchpad.net/bugs/%s" % \
|
||||
print "Successfully filed bug %s: https://launchpad.net/bugs/%s" % \
|
||||
(bug.bugnumber, bug.bugnumber)
|
||||
for sub in config["subscribers"].split(","):
|
||||
if sub.strip("\n").strip():
|
||||
|
@ -52,7 +52,7 @@ class BackportFromLP:
|
||||
links = re.findall('a href=\"(.*\.dsc)\"', contents)
|
||||
|
||||
if len(links) == 1 and \
|
||||
subprocess.call(['dget', '-xu', 'http://launchpad.net%s' % links[0]]) == 0:
|
||||
subprocess.call(['dget', '-xu', 'https://launchpad.net%s' % links[0]]) == 0:
|
||||
print '\nSuccess!'
|
||||
else:
|
||||
raise ValueError, '\nFailed to fetch and extract the source. ' +\
|
||||
|
Loading…
x
Reference in New Issue
Block a user