From: Christopher Lenz Date: Sun, 17 Jun 2007 21:02:01 +0000 (+0000) Subject: Make the check for the `message_extractors` setup keyword more robst. X-Git-Tag: 1.0~506 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e75e2ea6baff0f77a66b574572df9ffd97319dc;p=thirdparty%2Fbabel.git Make the check for the `message_extractors` setup keyword more robst. --- diff --git a/babel/messages/frontend.py b/babel/messages/frontend.py index 5e7e3879..622df2dd 100644 --- a/babel/messages/frontend.py +++ b/babel/messages/frontend.py @@ -201,7 +201,7 @@ class extract_messages(Command): finally: fileobj.close() - elif self.distribution.message_extractors: + elif getattr(self.distribution, 'message_extractors', None): message_extractors = self.distribution.message_extractors for dirname, mapping in message_extractors.items(): if isinstance(mapping, basestring):