summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Hajdan, Jr <phajdan.jr@gentoo.org>2012-02-02 17:47:36 +0100
committerPawel Hajdan, Jr <phajdan.jr@gentoo.org>2012-02-02 17:47:36 +0100
commite6c4d9a4da903a2c4d1f190089bed7e365d28f39 (patch)
tree8db14e23259f2be447aeb6355f0904f3c9d189ee /common.py
parentBegin work on maintainer-timeout script. (diff)
downloadarch-tools-e6c4d9a4da903a2c4d1f190089bed7e365d28f39.tar.gz
arch-tools-e6c4d9a4da903a2c4d1f190089bed7e365d28f39.tar.bz2
arch-tools-e6c4d9a4da903a2c4d1f190089bed7e365d28f39.zip
Working implementation of maintainer-timeout.
Diffstat (limited to 'common.py')
-rw-r--r--common.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/common.py b/common.py
index d6841fb..ad25ad8 100644
--- a/common.py
+++ b/common.py
@@ -2,6 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
import cStringIO
+import datetime
import re
import portage
@@ -50,6 +51,7 @@ class Bug:
self.__depends_on = [int(dep.text) for dep in xml.findall("dependson")]
self.__comments = [c.find("who").text + "\n" + c.find("thetext").text for c in xml.findall("long_desc")]
self.__cc = [cc.text for cc in xml.findall("cc")]
+ self.__creation_timestamp = datetime.datetime.strptime(xml.find('creation_ts').text, '%Y-%m-%d %H:%M:%S +0000')
self.__keywords = []
keywords_elem = xml.find("keywords")
@@ -92,6 +94,9 @@ class Bug:
def cc(self):
return self.__cc
+ def creation_timestamp(self):
+ return self.__creation_timestamp
+
def keywords(self):
return self.__keywords