From 111c5fdbcf84e60bf0329127fcebdb2cdcc14f1c Mon Sep 17 00:00:00 2001 From: Alexander Belchenko Date: Wed, 19 Jul 2006 23:53:44 +0300 Subject: win32: fix crash of 'be show' when bug don't have comments --- libbe/bugdir.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libbe') diff --git a/libbe/bugdir.py b/libbe/bugdir.py index 414b47e..4664c25 100644 --- a/libbe/bugdir.py +++ b/libbe/bugdir.py @@ -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 -- cgit