From: Christopher Lenz Date: Mon, 16 Jun 2008 10:14:38 +0000 (+0000) Subject: Remove leftover unused code from [365]. X-Git-Tag: 1.0~332 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fa1efb80c2d386faabd2b169a16bc8f9cbc33a9;p=thirdparty%2Fbabel.git Remove leftover unused code from [365]. --- diff --git a/babel/messages/extract.py b/babel/messages/extract.py index 1a1862e1..f43be886 100644 --- a/babel/messages/extract.py +++ b/babel/messages/extract.py @@ -253,12 +253,6 @@ def extract(method, fileobj, keywords=DEFAULT_KEYWORDS, comment_tags=(), else: module, attrname = method.split(':', 1) func = getattr(__import__(module, {}, {}, [attrname]), attrname) - elif '.' in method: - parts = method.split('.') - clsname - if ':' in method: - module, clsname = method.split(':', 1) - func = getattr(__import__(module, {}, {}, [clsname]), clsname) else: try: from pkg_resources import working_set diff --git a/babel/messages/tests/extract.py b/babel/messages/tests/extract.py index 5d0a1cd7..5d985184 100644 --- a/babel/messages/tests/extract.py +++ b/babel/messages/tests/extract.py @@ -321,6 +321,7 @@ _('Babatschi')""") self.assertEqual([u'This is a multiline comment with', u'a prefix too'], messages[1][2]) + class ExtractJavaScriptTestCase(unittest.TestCase): def test_simple_extract(self): @@ -411,6 +412,7 @@ _('no comment here') self.assertEqual(u'no comment here', messages[2][2]) self.assertEqual([], messages[2][3]) + class ExtractTestCase(unittest.TestCase): def test_invalid_filter(self): @@ -468,6 +470,7 @@ msg = _('') finally: sys.stderr = stderr + def suite(): suite = unittest.TestSuite() suite.addTest(doctest.DocTestSuite(extract))