diff --git a/VERSION b/VERSION index 3e220c38..547cf763 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.07.19.12.42.17 +Version 2.6.0-development+timestamp.2013.07.19.17.41.29 diff --git a/scripts/extract_mysql_models.py b/scripts/extract_mysql_models.py index 82efb9a5..4b4d4281 100644 --- a/scripts/extract_mysql_models.py +++ b/scripts/extract_mysql_models.py @@ -79,8 +79,9 @@ def mysql(database_name, username, password): if 'CREATE' in sql_create_stmnt: # check if the table exists #remove garbage lines from sql statement sql_lines = sql_create_stmnt.split('\n') - sql_lines = [x for x in sql_lines if not( - x.startswith('--') or x.startswith('/*') or x == '')] + sql_lines = filter( + lambda x: not(x in ('','\r') or x[:2] in ('--','/*')), + sql_lines) #generate the web2py code from the create statement web2py_table_code = '' table_name = re.search(