Project

General

Profile

« Previous | Next » 

Revision 3182

sql_gen.py: Added lstrip() to remove comments

View differences:

lib/sql_gen.py
48 48

  
49 49
def esc_comment(comment): return '/*'+comment.replace('*/', '* /')+'*/'
50 50

  
51
def lstrip(str_):
52
    '''Also removes comments.'''
53
    if str_.startswith('/*'): comment, sep, str_ = str_.partition('*/')
54
    return str_.lstrip()
55

  
51 56
##### General SQL code objects
52 57

  
53 58
class MockDb:

Also available in: Unified diff