diff options
author | W. Trevor King <wking@drexel.edu> | 2010-02-02 12:32:53 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2010-02-02 12:32:53 -0500 |
commit | d98052a067923616efd3a27626dca29301d74246 (patch) | |
tree | 8ee5b55b536624812e1031696a3d22864b70872c /libbe/command/comment.py | |
parent | 3e16a0ab627a095605f14a5164c2d8e14a3bcaa9 (diff) | |
download | bugseverywhere-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/comment.py')
-rw-r--r-- | libbe/command/comment.py | 4 |
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() |