aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-09-21 09:52:28 -0400
committerW. Trevor King <wking@drexel.edu>2009-09-21 09:52:28 -0400
commite174881e3e39fbffa75aa0a1f858998827ad204c (patch)
tree67745f3f33a3e3eb99b4d273610ea0125d817bd1
parent59414d47c0fe16b9b6eb8cf765038db9032410c9 (diff)
downloadbugseverywhere-e174881e3e39fbffa75aa0a1f858998827ad204c.tar.gz
os.path.isdir() -> .exists() for check for "comments" file.
"comments" should always be a directory if it exists, but if it is something else, be should fail rather than return an empty comment list. This fix was inspired by some browsing around in response to Thomas Habets' version of a fix for missing "bugs" directory.
-rw-r--r--libbe/comment.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbe/comment.py b/libbe/comment.py
index 19c556f..41bc7e6 100644
--- a/libbe/comment.py
+++ b/libbe/comment.py
@@ -128,7 +128,7 @@ def loadComments(bug, load_full=False):
if bug.sync_with_disk == False:
raise DiskAccessRequired("load comments")
path = bug.get_path("comments")
- if not os.path.isdir(path):
+ if not os.path.exists(path):
return Comment(bug, uuid=INVALID_UUID)
comments = []
for uuid in os.listdir(path):