diff options
author | W. Trevor King <wking@drexel.edu> | 2010-02-02 14:11:14 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2010-02-02 14:11:14 -0500 |
commit | 3f27c5c3bbc1ecd00db51c4894a9bf9651ae4fbb (patch) | |
tree | 0aaa7911d308de4585e756d04924f452b6cb0576 /libbe/comment.py | |
parent | 907d5f0887f52b6bb718d4ff2a58d3d214c480f8 (diff) | |
download | bugseverywhere-3f27c5c3bbc1ecd00db51c4894a9bf9651ae4fbb.tar.gz |
Sort comments in `be html`.
Diffstat (limited to 'libbe/comment.py')
-rw-r--r-- | libbe/comment.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/libbe/comment.py b/libbe/comment.py index a6a4ebd..dd245de 100644 --- a/libbe/comment.py +++ b/libbe/comment.py @@ -523,14 +523,6 @@ class Comment (Tree, settings_object.SavedSettingsObject): Comment in the thread. The method must take the arguments indent and shortname. - SIDE-EFFECT: if auto_name_map==True, calls comment_shortnames() - which will sort the tree by comment.time. Avoid by calling - name_map = {} - for shortname,comment in comm.comment_shortnames(bug_shortname): - name_map[comment.uuid] = shortname - comm.sort(key=lambda c : c.author) # your sort - comm.string_thread(name_map=name_map) - >>> a = Comment(bug=None, uuid="a", body="Insightful remarks") >>> a.time = utility.str_to_time("Thu, 20 Nov 2008 01:00:00 +0000") >>> b = a.new_reply("Critique original comment") |