Skip to content

Commit

Permalink
修复当数据库密码包含@时bug
Browse files Browse the repository at this point in the history
  • Loading branch information
myhhub committed Dec 12, 2024
1 parent 13cbc64 commit 6f3fabc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions instock/lib/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from sqlalchemy import create_engine
from sqlalchemy.types import NVARCHAR
from sqlalchemy import inspect
from urllib.parse import quote_plus as urlquote

__author__ = 'myh '
__date__ = '2023/3/10 '
Expand All @@ -28,6 +29,7 @@
_db_password = os.environ.get('db_password')
if _db_password is not None:
db_password = _db_password
db_password = urlquote(db_password)
_db_database = os.environ.get('db_database')
if _db_database is not None:
db_database = _db_database
Expand Down

0 comments on commit 6f3fabc

Please sign in to comment.