mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +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,
|
m = re.search('"/ubuntu/%s/\+source/%s/(\d[^"]+)"' % (release,
|
||||||
package.replace('+', '\+')), page)
|
package.replace('+', '\+')), page)
|
||||||
if not m:
|
if not m:
|
||||||
print >> sys.stderr, "Unable to find this source package (%s) in " \
|
print >> sys.stderr, "Unable to find this source package '%s' in " \
|
||||||
"this release (%s)." % (package, release.capitalize())
|
"the %s release." % (package, release.capitalize())
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
except urllib2.HTTPError, error: # Raised on 404.
|
except urllib2.HTTPError, error: # Raised on 404.
|
||||||
if error.code == 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
|
"exist in Ubuntu." % package
|
||||||
else: # Other error code, probably Launchpad malfunction.
|
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
|
"%s." % error.code
|
||||||
|
|
||||||
sys.exit(1) # Exit. Error encountered.
|
sys.exit(1) # Exit. Error encountered.
|
||||||
|
|
||||||
except urllib2.URLError, error: # Other error (NXDOMAIN, ...)
|
except urllib2.URLError, error: # Other error (NXDOMAIN, ...)
|
||||||
(_, reason) = error.reason
|
(_, reason) = error.reason
|
||||||
print >> sys.stderr, "Error when checking Launchpad for package: %s." % \
|
print >> sys.stderr, "Error while checking Launchpad for package: %s." % \
|
||||||
reason
|
reason
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
2
massfile
2
massfile
@ -99,7 +99,7 @@ def file_bug(config):
|
|||||||
"target": "ubuntu"},
|
"target": "ubuntu"},
|
||||||
summary=summary,
|
summary=summary,
|
||||||
description=description)
|
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)
|
(bug.bugnumber, bug.bugnumber)
|
||||||
for sub in config["subscribers"].split(","):
|
for sub in config["subscribers"].split(","):
|
||||||
if sub.strip("\n").strip():
|
if sub.strip("\n").strip():
|
||||||
|
@ -52,7 +52,7 @@ class BackportFromLP:
|
|||||||
links = re.findall('a href=\"(.*\.dsc)\"', contents)
|
links = re.findall('a href=\"(.*\.dsc)\"', contents)
|
||||||
|
|
||||||
if len(links) == 1 and \
|
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!'
|
print '\nSuccess!'
|
||||||
else:
|
else:
|
||||||
raise ValueError, '\nFailed to fetch and extract the source. ' +\
|
raise ValueError, '\nFailed to fetch and extract the source. ' +\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user