diff options
author | W. Trevor King <wking@drexel.edu> | 2008-11-19 08:05:17 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2008-11-19 08:05:17 -0500 |
commit | 3697d561fef7f4ee15a6b4d9906a9a9114412965 (patch) | |
tree | def98f80a57c5cc0dfd7d3c79500800376684cb6 /libbe/bug.py | |
parent | 35b7aaa33c1826d7b39dc8a0f32100f5c0c5788d (diff) | |
download | bugseverywhere-3697d561fef7f4ee15a6b4d9906a9a9114412965.tar.gz |
Merged bug.new_comment into bug.Bug.new_comment.
Diffstat (limited to 'libbe/bug.py')
-rw-r--r-- | libbe/bug.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libbe/bug.py b/libbe/bug.py index 4cb53c2..a297b1a 100644 --- a/libbe/bug.py +++ b/libbe/bug.py @@ -186,12 +186,15 @@ class Bug(object): path = self.get_path() self.rcs.recursive_remove(path) - def new_comment(self): + def new_comment(self, body=None): if not os.path.exists(self.get_path("comments")): self.rcs.mkdir(self.get_path("comments")) comm = Comment(None, self) comm.uuid = names.uuid() comm.rcs = self.rcs + comm.From = self.rcs.get_user_id() + comm.time = time.time() + comm.body = body return comm def get_comment(self, uuid): @@ -216,13 +219,6 @@ class Bug(object): comments.sort(cmp_time) return comments -def new_comment(bug, body=None): - comm = bug.new_comment() - comm.From = comm.rcs.get_user_id() - comm.time = time.time() - comm.body = body - return comm - def add_headers(obj, map, names): map_names = {} for name in names: |