From: Martin Pitt Date: Wed, 12 Dec 2007 15:51:57 +0000 (+0100) Subject: buildd.py: get along with + in package name X-Git-Url: https://piware.de/gitweb/?a=commitdiff_plain;h=c4e19cd463ddd287b271f29fb21f6e6b4530b03b;p=bin.git buildd.py: get along with + in package name --- diff --git a/buildd.py b/buildd.py index 6540a02..598d8d1 100755 --- a/buildd.py +++ b/buildd.py @@ -36,7 +36,7 @@ except urllib2.HTTPError: print >> sys.stderr, 'This source does not appear to exist in Ubuntu' sys.exit(1) -m = re.search('"/ubuntu/%s/\+source/%s/(\d[^"]+)"' % (release, package), page) +m = re.search('"/ubuntu/%s/\+source/%s/(\d[^"]+)"' % (release, package.replace('+', '\+')), page) if not m: print >> sys.stderr, 'Cannot find this source package in this release' sys.exit(1) @@ -49,7 +49,7 @@ page = urlopener.open('https://launchpad.net/ubuntu/+source/%s/%s' % (package, v url = page.geturl() page = page.read() for m in re.finditer('"/ubuntu/\+source/%s/%s(/\+build/\d+)"[^\n]+\n\s*(\w+).*?(\w+).*?\s*([^\n]+)\n' % - (package, version.replace('+', '\+')), page, re.S): + (package.replace('+', '\+'), version.replace('+', '\+')), page, re.S): if m.group(2) == release: print '%s: %s' % (m.group(3), m.group(4)) buildstats[url + m.group(1)] = [m.group(3).strip(), m.group(4).strip()]