requestsync: catch AssertionError exception if rmadison returns with an error.

This commit is contained in:
Luca Falavigna 2009-01-12 20:41:22 +01:00
parent c1b9bd2081
commit e76337f142
2 changed files with 10 additions and 2 deletions

6
debian/changelog vendored
View File

@ -33,7 +33,11 @@ ubuntu-dev-tools (0.52) UNRELEASED; urgency=low
* requestsync: If package is new, check the Ubuntu Archive team's bug list
for possible duplicate requests.
-- Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com> Sat, 10 Jan 2009 14:35:14 +0100
[ Luca Falavigna ]
* requestsync:
- Catch AssertionError exception if rmadison returns with an error.
-- Luca Falavigna <dktrkranz@ubuntu.com> Mon, 12 Jan 2009 20:28:01 +0100
ubuntu-dev-tools (0.51) jaunty; urgency=low

View File

@ -143,7 +143,11 @@ def cur_version_component(sourcepkg, release):
madison = subprocess.Popen(['rmadison', '-u', 'ubuntu', '-a', 'source', \
'-s', release, sourcepkg], stdout=subprocess.PIPE)
out = madison.communicate()[0]
try:
assert (madison.returncode == 0)
except AssertionError:
print out
sys.exit(1)
for l in out.splitlines():
(pkg, version, rel, builds) = l.split('|')