From b947882b7cd68094ff5f1b8ecb3b7b510a905a89 Mon Sep 17 00:00:00 2001 From: longfengpili <398745129@qq.com> Date: Wed, 12 Oct 2022 11:40:25 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BC=98=E5=8C=96]error=20sql=20change=20to?= =?UTF-8?q?=20oneline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pydbapi/db/base.py | 3 ++- setup.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pydbapi/db/base.py b/pydbapi/db/base.py index 934f96c..a67ba57 100644 --- a/pydbapi/db/base.py +++ b/pydbapi/db/base.py @@ -1,7 +1,7 @@ # @Author: chunyang.xu # @Email: 398745129@qq.com # @Date: 2020-06-02 18:46:58 -# @Last Modified time: 2022-08-11 12:10:21 +# @Last Modified time: 2022-10-12 11:37:47 # @github: https://github.com/longfengpili # !/usr/bin/env python3 @@ -42,6 +42,7 @@ def __execute_step(self, cursor, sql, ehandling='raise'): try: cursor.execute(sql) except Exception as e: + sql = sql.replace('\n', '') # sql转换成一行 dblogger.error(f"【Error】{e}, 【error Sql】: {sql}") if ehandling == 'raise': diff --git a/setup.py b/setup.py index 8f70801..36cc87d 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ # @Author: chunyang.xu # @Email: 398745129@qq.com # @Date: 2020-06-09 16:46:54 -# @Last Modified time: 2022-08-11 15:15:44 +# @Last Modified time: 2022-10-12 11:40:00 # @github: https://github.com/longfengpili # !/usr/bin/env python3 @@ -12,7 +12,7 @@ import shutil import setuptools -VERSION = '0.0.90' +VERSION = '0.0.91' PROJECT_NAME = 'pydbapi' with open('README.md', 'r', encoding='utf-8') as f: