aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/command
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2010-02-02 12:32:53 -0500
committerW. Trevor King <wking@drexel.edu>2010-02-02 12:32:53 -0500
commitd98052a067923616efd3a27626dca29301d74246 (patch)
tree8ee5b55b536624812e1031696a3d22864b70872c /libbe/command
parent3e16a0ab627a095605f14a5164c2d8e14a3bcaa9 (diff)
downloadbugseverywhere-d98052a067923616efd3a27626dca29301d74246.tar.gz
Restore "content_type" kwarg to Comment.new_reply().
It had been removed in revno: 473.1.43 committer: W. Trevor King <wking@drexel.edu> branch nick: be.restructure timestamp: Mon 2009-12-14 07:37:51 -0500 message: Transitioned comment to Command format when we pushed unicode encoding/decoding back to the Storage backend. However, with the addition of libbe.util.id.short_to_long_text(), we need it again. Also add a Doctest showing a non-text/* comment, so utilities dealing with them can see what they'll be working with.
Diffstat (limited to 'libbe/command')
-rw-r--r--libbe/command/comment.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbe/command/comment.py b/libbe/command/comment.py
index b269840..5bf6acf 100644
--- a/libbe/command/comment.py
+++ b/libbe/command/comment.py
@@ -150,8 +150,8 @@ class Comment (libbe.command.Command):
if params['author'] == None:
params['author'] = self._get_user_id()
- new = parent.new_reply(body=body)
- for key in ['alt-id', 'author', 'content-type']:
+ new = parent.new_reply(body=body, content_type=params['content-type'])
+ for key in ['alt-id', 'author']:
if params[key] != None:
setattr(new, new._setting_name_to_attr_name(key), params[key])
print >> self.stdout, 'Created comment with ID %s' % new.id.user()