From 9e3267a4fd47e5ff95ebbd92305221aa88ac8bb8 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Mon, 22 Apr 2013 18:42:00 +0300 Subject: DebianSource: raise DebianSourceError if reading changelog fails Signed-off-by: Markus Lehtonen --- gbp/deb/source.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gbp/deb') diff --git a/gbp/deb/source.py b/gbp/deb/source.py index 1959ec9d..a23f8a7e 100644 --- a/gbp/deb/source.py +++ b/gbp/deb/source.py @@ -78,8 +78,11 @@ class DebianSource(object): Return the L{gbp.deb.ChangeLog} """ if not self._changelog: - clf = self._vfs.open('debian/changelog') - self._changelog = ChangeLog(clf.read()) + try: + clf = self._vfs.open('debian/changelog') + self._changelog = ChangeLog(clf.read()) + except IOError as err: + raise DebianSourceError('Failed to read changelog: %s' % err) return self._changelog @property -- cgit v1.2.3