win32: fix crash of 'be show' when bug don't have comments
authorAlexander Belchenko <bialix@ukr.net>
Wed, 19 Jul 2006 20:53:44 +0000 (23:53 +0300)
committerAlexander Belchenko <bialix@ukr.net>
Wed, 19 Jul 2006 20:53:44 +0000 (23:53 +0300)
libbe/bugdir.py

index 414b47e2522885270f0ba4e93e2d32283392eb90..4664c2551ce331747ce01894cb6e565f97ab9f8f 100644 (file)
@@ -287,8 +287,11 @@ class Bug(object):
         return Comment(uuid, self)
 
     def iter_comment_ids(self):
+        path = self.get_path("comments")
+        if not os.path.isdir(path):
+            return
         try:
-            for uuid in os.listdir(self.get_path("comments")):
+            for uuid in os.listdir(path):
                 if (uuid.startswith('.')):
                     continue
                 yield uuid