Skip to content

Commit 3af13e2

Browse files
committed
🦺 refine exception handling in MySQL view parsing to include AttributeError and TypeError
1 parent 830889c commit 3af13e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mysql_to_sqlite3/transporter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ def _mysql_viewdef_to_sqlite(self, view_select_sql: str, view_name: str) -> str:
902902

903903
try:
904904
tree = parse_one(cleaned_sql, read="mysql")
905-
except (ParseError, ValueError, Exception): # pylint: disable=W0718
905+
except (ParseError, ValueError, AttributeError, TypeError):
906906
# Fallback: try to remove schema qualifiers if requested, then return
907907
stripped_sql = cleaned_sql
908908
# Remove qualifiers `schema`.tbl or "schema".tbl or schema.tbl

0 commit comments

Comments
 (0)