From 5a1d58a6fc69ddc04abb8750e1cf2e156caa04ab Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Fri, 12 Aug 2011 14:56:21 +0200 Subject: Remove with statement to stay as compatible with older Python versions as possible. For now, sqlparse is still compatible with Python 2.4 :) --- sqlparse/filters.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sqlparse') diff --git a/sqlparse/filters.py b/sqlparse/filters.py index 2d715a8..cba7b8f 100644 --- a/sqlparse/filters.py +++ b/sqlparse/filters.py @@ -108,9 +108,9 @@ class IncludeStatement(Filter): # Include file if path was found if path: try: - with open(path) as f: - raw_sql = f.read() - + f = open(path) + raw_sql = f.read() + f.close() except IOError, err: yield Comment, u'-- IOError: %s\n' % err -- cgit v1.2.1