summaryrefslogtreecommitdiff
path: root/sqlparse
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2010-08-26 15:25:58 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2010-08-26 15:25:58 +0200
commit3f0263730488e2858a5bfef56a0a4e57b289319d (patch)
tree3867fa60db126821ddef49f41e2dedb8987ae686 /sqlparse
parent92f767b05e7ccda6d62190fb6aa425557240dcff (diff)
downloadsqlparse-3f0263730488e2858a5bfef56a0a4e57b289319d.tar.gz
Check for None values in options dict, reported by Marco44.
See http://groups.google.com/group/sqlparse/browse_thread/thread/2acecd715a48a169 The default options for identifiers and keywords (to do nothing) got lost since both are in the options dict, but with None as value.
Diffstat (limited to 'sqlparse')
-rw-r--r--sqlparse/formatter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sqlparse/formatter.py b/sqlparse/formatter.py
index c03e9a9..5be6652 100644
--- a/sqlparse/formatter.py
+++ b/sqlparse/formatter.py
@@ -76,11 +76,11 @@ def build_filter_stack(stack, options):
options: Dictionary with options validated by validate_options.
"""
# Token filter
- if 'keyword_case' in options:
+ if options.get('keyword_case', None):
stack.preprocess.append(
filters.KeywordCaseFilter(options['keyword_case']))
- if 'identifier_case' in options:
+ if options.get('identifier_case', None):
stack.preprocess.append(
filters.IdentifierCaseFilter(options['identifier_case']))