From ecc9501387ed9f16728a05b8735b6d98f78680bb Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Wed, 28 Mar 2012 14:27:37 +0200 Subject: [PATCH] pull-debian-source: Handle JSON parsing failures in DDE responses --- pull-debian-source | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pull-debian-source b/pull-debian-source index 0351626..176cee9 100755 --- a/pull-debian-source +++ b/pull-debian-source @@ -61,6 +61,10 @@ def source_package_for(binary, release): Logger.error('Unable to retrieve package information from DDE: ' '%s (%s)', url, str(e)) return None + except ValueError, e: + Logger.error('Unable to parse JSON response from DDE: ' + '%s (%s)', url, str(e)) + return None if not data: return None return data[0]['source']