# HG changeset patch # User jruigrok # Date 1209029109 0 # Node ID 715386084edd45227d2dd2ad43cdb36e06f9af4c # Parent 0e1049d9c81dc6d413b5cbb848b74061d7d25303 Back out last change, this broke extraction. diff --git a/babel/util.py b/babel/util.py --- a/babel/util.py +++ b/babel/util.py @@ -16,6 +16,7 @@ import codecs from datetime import timedelta, tzinfo import os +import parser import re try: set @@ -74,9 +75,8 @@ m = PYTHON_MAGIC_COMMENT_re.match(line1) if not m: try: - import parser parser.suite(line1) - except ImportError, SyntaxError: + except SyntaxError: # Either it's a real syntax error, in which case the source is # not valid python source, or line2 is a continuation of line1, # in which case we don't want to scan line2 for a magic