From b72239847f13152061182973ea573dd2e835a89e Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 4 Nov 2017 01:32:55 +0300 Subject: [PATCH] Refactor(process_mysql): Get DML type --- sqlconvert/process_mysql.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sqlconvert/process_mysql.py b/sqlconvert/process_mysql.py index e99ea79..fad7e4c 100644 --- a/sqlconvert/process_mysql.py +++ b/sqlconvert/process_mysql.py @@ -147,10 +147,10 @@ def process_statement(statement, dbname='sqlite'): remove_directive_tokens(statement) escape_strings(statement, dbname) try: - is_insert = get_DML_type(statement) == 'INSERT' + dml_type = get_DML_type(statement) except ValueError: - is_insert = False - if is_insert: + dml_type = 'UNKNOWN' + if dml_type == 'INSERT': for statement in split_ext_insert(statement): yield statement else: -- 2.39.5