aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-03-15 21:19:48 +0100
committerGuido Günther <agx@sigxcpu.org>2012-03-15 21:19:48 +0100
commit797a229ff721d2d831e6c08b06c3eea272c4dc2b (patch)
treee68c705db254c0521d5db1e6a9c4d824b5018e33 /gbp
parent3cac77fc577834f76cfbdc241b18b2fb9c9aeeab (diff)
deb.changelog: allow to extract author and date
Diffstat (limited to 'gbp')
-rw-r--r--gbp/deb/changelog.py22
1 files changed, 22 insertions, 0 deletions
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']
+