diff --git a/scripts/extract_sqlite_models.py b/scripts/extract_sqlite_models.py index 3ba34ecb..73881ac5 100644 --- a/scripts/extract_sqlite_models.py +++ b/scripts/extract_sqlite_models.py @@ -84,7 +84,9 @@ def sqlite(database_name): for line in sql_lines[1:-1]: if re.search('KEY', line) or re.search('PRIMARY', line) or re.search('"ID"', line) or line.startswith(')'): continue - hit = re.search('"(\S+)"\s+(\S+)(,| )( .*)?', line) + print line + hit = re.search(r'"(\S+)"\s+(\w+(\(\S+\))?),?( .*)?', line) + print hit and hit.groups() if hit is not None: name, d_type = hit.group(1), hit.group(2) d_type = re.sub(r'(\w+)\(.*', r'\1', d_type)