From 797a229ff721d2d831e6c08b06c3eea272c4dc2b Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Thu, 15 Mar 2012 21:19:48 +0100 Subject: deb.changelog: allow to extract author and date --- gbp/deb/changelog.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'gbp') diff --git a/gbp/deb/changelog.py b/gbp/deb/changelog.py index 674e9e7a..b8c10b86 100644 --- a/gbp/deb/changelog.py +++ b/gbp/deb/changelog.py @@ -126,3 +126,25 @@ class ChangeLog(object): Whether this is a native Debian package """ return not '-' in self.version + + @property + def author(self): + """ + The author of the last modification + """ + return email.Utils.parseaddr(self._cp['Maintainer'])[0] + + @property + def email(self): + """ + The author's email + """ + return email.Utils.parseaddr(self._cp['Maintainer'])[1] + + @property + def date(self): + """ + The date of the last modification as rfc822 date + """ + return self._cp['Date'] + -- cgit v1.2.3