From: Alexander Belchenko Date: Wed, 19 Jul 2006 20:53:44 +0000 (+0300) Subject: win32: fix crash of 'be show' when bug don't have comments X-Git-Tag: 1.0.0~185^2~8^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=111c5fdbcf84e60bf0329127fcebdb2cdcc14f1c;p=be.git win32: fix crash of 'be show' when bug don't have comments --- 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