diff options
author | W. Trevor King <wking@drexel.edu> | 2008-11-23 09:50:56 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2008-11-23 09:50:56 -0500 |
commit | 510c9f33393c1f222ee56732c026f229ed8ae49d (patch) | |
tree | ba51973a3fd3eb5893d413f6c8b5a721867d26dc /libbe/comment.py | |
parent | 333fc7968794deff9aa7a7a91d72cf17763df855 (diff) | |
download | bugseverywhere-510c9f33393c1f222ee56732c026f229ed8ae49d.tar.gz |
Go back to lazy bug loading to get execution speed back up.
Fixes bug b3c6da51-3a30-42c9-8c75-587c7a1705c5
Diffstat (limited to 'libbe/comment.py')
-rw-r--r-- | libbe/comment.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libbe/comment.py b/libbe/comment.py index 0bfc12d..9b87f18 100644 --- a/libbe/comment.py +++ b/libbe/comment.py @@ -63,7 +63,7 @@ def loadComments(bug): for uuid in os.listdir(path): if uuid.startswith('.'): continue - comm = Comment(bug, uuid, loadNow=True) + comm = Comment(bug, uuid, from_disk=True) comments.append(comm) return _list_to_root(comments, bug) @@ -74,16 +74,16 @@ def saveComments(bug): comment.save() class Comment(Tree): - def __init__(self, bug=None, uuid=None, loadNow=False, + def __init__(self, bug=None, uuid=None, from_disk=False, in_reply_to=None, body=None): """ - Set loadNow=True to load an old bug. - Set loadNow=False to create a new bug. + Set from_disk=True to load an old bug. + Set from_disk=False to create a new bug. - The uuid option is required when loadNow==True. + The uuid option is required when from_disk==True. The in_reply_to and body options are only used if - loadNow==False (the default). When loadNow==True, they are + from_disk==False (the default). When from_disk==True, they are loaded from the bug database. in_reply_to should be the uuid string of the parent comment. @@ -94,7 +94,7 @@ class Comment(Tree): self.rcs = bug.rcs else: self.rcs = None - if loadNow == True: + if from_disk == True: self.uuid = uuid self.load() else: |