aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2008-11-16 14:32:19 -0500
committerW. Trevor King <wking@drexel.edu>2008-11-16 14:32:19 -0500
commit8634003f4a85e03108e055155015579191fa9c39 (patch)
tree8a4b3ad545277ec73b0d67b68a6d601bce1db72b
parent45640a0b55cebe2a04c9a35f3864c541b2e78cc1 (diff)
downloadbugseverywhere-8634003f4a85e03108e055155015579191fa9c39.tar.gz
Fix Bug.string() handling of None times.
-rw-r--r--libbe/bug.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/libbe/bug.py b/libbe/bug.py
index a0054ca..f973cf0 100644
--- a/libbe/bug.py
+++ b/libbe/bug.py
@@ -118,8 +118,12 @@ class Bug(object):
bugs = list(self.bugdir.list())
short_name = names.unique_name(self, bugs)
if shortlist == False:
- htime = utility.handy_time(self.time)
- ftime = utility.time_to_str(self.time)
+ if self.time == None:
+ timestring = ""
+ else:
+ htime = utility.handy_time(self.time)
+ ftime = utility.time_to_str(self.time)
+ timestring = "%s (%s)" % (htime, ftime)
info = [("ID", self.uuid),
("Short name", short_name),
("Severity", self.severity),
@@ -127,7 +131,7 @@ class Bug(object):
("Assigned", self.assigned),
("Target", self.target),
("Creator", self.creator),
- ("Created", "%s (%s)" % (htime, ftime))]
+ ("Created", timestring)]
newinfo = []
for k,v in info:
if v == None: