Revision 2984
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_gen.py | ||
---|---|---|
36 | 36 |
* contains only *lowercase* word (\w) characters |
37 | 37 |
* doesn't start with a digit |
38 | 38 |
* contains "_", so that it's not a keyword |
39 |
'''
|
|
40 |
return re.match(r'^(?=.*_)(?!\d)[^\WA-Z]+$', name)
|
|
39 |
''' |
|
40 |
return re.match(r'^(?=.*_)(?!\d)[^\WA-Z]+$', name) |
|
41 | 41 |
|
42 | 42 |
def esc_name(name, quote='"'): |
43 | 43 |
return quote + name.replace(quote, quote+quote) + quote |
lib/sql.py | ||
---|---|---|
419 | 419 |
|
420 | 420 |
debug_msg_ref = None # usually, db.run_query() logs query before running it |
421 | 421 |
# But if filtering with log_ignore_excs, wait until after exception parsing |
422 |
if log_ignore_excs != () or not db.can_mogrify(): debug_msg_ref = [None]
|
|
422 |
if log_ignore_excs != () or not db.can_mogrify(): debug_msg_ref = [None] |
|
423 | 423 |
|
424 | 424 |
try: |
425 | 425 |
try: |
lib/xml_func.py | ||
---|---|---|
234 | 234 |
try: new_value = repls[value] |
235 | 235 |
except KeyError, e: |
236 | 236 |
# Save traceback right away in case another exception raised |
237 |
fe = FormatException(e)
|
|
237 |
fe = FormatException(e) |
|
238 | 238 |
try: new_value = repls['*'] |
239 | 239 |
except KeyError: raise fe |
240 | 240 |
if new_value == '*': new_value = value # '*' means keep input value the same |
Also available in: Unified diff
Removed extra trailing whitespace