From 4f5c24fbb31b505df97d076bcc6516a8f99a8912 Mon Sep 17 00:00:00 2001 From: "axel%pike.org" Date: Fri, 9 Mar 2007 09:43:56 +0000 Subject: [PATCH] bug 373296, fix bustage for empty dirs in directory walking code --- testing/tests/l10n/lib/Mozilla/CompareLocales.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testing/tests/l10n/lib/Mozilla/CompareLocales.py b/testing/tests/l10n/lib/Mozilla/CompareLocales.py index 729cd297fd6..0e36716f1aa 100755 --- a/testing/tests/l10n/lib/Mozilla/CompareLocales.py +++ b/testing/tests/l10n/lib/Mozilla/CompareLocales.py @@ -80,7 +80,11 @@ class FileCollector: self.__base = path def __iter__(self): self.__w = os.walk(self.__base) - self.__nextDir() + try: + self.__nextDir() + except StopIteration: + # empty dir, bad, but happens + self.__i = [].__iter__() return self def __nextDir(self): self.__t = self.__w.next()