aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/bugdir.py
diff options
context:
space:
mode:
authorAaron Bentley <abentley@panoramicfeedback.com>2006-04-06 12:50:57 -0400
committerAaron Bentley <abentley@panoramicfeedback.com>2006-04-06 12:50:57 -0400
commite762576b97dc1c7ccbb7b0d07b94d9d42ec36b9d (patch)
tree10874dfe42b52e1b9921dc2b1cae0976e78031c1 /libbe/bugdir.py
parent5d75c1f4b7362ef184276f781346e69c34bd4874 (diff)
downloadbugseverywhere-e762576b97dc1c7ccbb7b0d07b94d9d42ec36b9d.tar.gz
Support for content-type in comments
Diffstat (limited to 'libbe/bugdir.py')
-rw-r--r--libbe/bugdir.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbe/bugdir.py b/libbe/bugdir.py
index b680d16..414b47e 100644
--- a/libbe/bugdir.py
+++ b/libbe/bugdir.py
@@ -348,16 +348,18 @@ class Comment(object):
self.date = utility.str_to_time(mapfile["Date"])
self.From = mapfile["From"]
self.in_reply_to = mapfile.get("In-reply-to")
+ self.content_type = mapfile.get("Content-type", "text/plain")
self.body = file(self.get_path("body")).read().decode("utf-8")
else:
self.date = None
self.From = None
self.in_reply_to = None
+ self.content_type = "text/plain"
self.body = None
def save(self):
map_file = {"Date": utility.time_to_str(self.date)}
- add_headers(self, map_file, ("From", "in_reply_to"))
+ add_headers(self, map_file, ("From", "in_reply_to", "content_type"))
if not os.path.exists(self.get_path(None)):
self.bug.rcs.mkdir(self.get_path(None))
map_save(self.bug.rcs, self.get_path("values"), map_file)