Skip to content

Commit

Permalink
[优化]error sql change to oneline
Browse files Browse the repository at this point in the history
  • Loading branch information
longfengpili committed Oct 12, 2022
1 parent b16ef8e commit b947882
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pydbapi/db/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# @Author: chunyang.xu
# @Email: [email protected]
# @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
Expand Down Expand Up @@ -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':
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# @Author: chunyang.xu
# @Email: [email protected]
# @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
Expand All @@ -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:
Expand Down

0 comments on commit b947882

Please sign in to comment.