diff options
| author | Jesús Leganés Combarro "Piranna" <jesus.lc@vaelsys.com> | 2012-05-17 16:38:10 +0200 |
|---|---|---|
| committer | Jesús Leganés Combarro "Piranna" <jesus.lc@vaelsys.com> | 2012-05-17 16:38:10 +0200 |
| commit | 7f422d3e99bb21801db6f65619c876f709cdf44a (patch) | |
| tree | e973195b091c2bddf03d161cee2b983a8678b60e /sqlparse | |
| parent | c45e0c62373407544c089ada7240c99da79ff29e (diff) | |
| download | sqlparse-7f422d3e99bb21801db6f65619c876f709cdf44a.tar.gz | |
Optimized IncludeStatement
Diffstat (limited to 'sqlparse')
| -rw-r--r-- | sqlparse/filters.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sqlparse/filters.py b/sqlparse/filters.py index 291a613..9ee2ce0 100644 --- a/sqlparse/filters.py +++ b/sqlparse/filters.py @@ -110,17 +110,15 @@ class IncludeStatement: elif self.detected: # Omit whitespaces if token_type in Whitespace: - pass - - # Get path of file to include - path = None + continue + # Found file path to include if token_type in String.Symbol: # if token_type in tokens.String.Symbol: + + # Get path of file to include path = join(self.dirpath, value[1:-1]) - # Include file if path was found - if path: try: f = open(path) raw_sql = f.read() |
