summaryrefslogtreecommitdiff
path: root/sqlparse
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2011-08-12 14:56:21 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2011-08-12 14:56:21 +0200
commit5a1d58a6fc69ddc04abb8750e1cf2e156caa04ab (patch)
treee7500ac16b7414e93da52dcf6e467955044105c8 /sqlparse
parent14863e77130da92303a32d3e1a726b72ec178277 (diff)
downloadsqlparse-5a1d58a6fc69ddc04abb8750e1cf2e156caa04ab.tar.gz
Remove with statement to stay as compatible with older Python versions as possible.
For now, sqlparse is still compatible with Python 2.4 :)
Diffstat (limited to 'sqlparse')
-rw-r--r--sqlparse/filters.py6
1 files changed, 3 insertions, 3 deletions
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