mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-19 21:33:41 -05:00
1.4.1-alpha - hotfix
This commit is contained in:
parent
d70b2ce859
commit
e537c3083e
4 changed files with 9 additions and 3 deletions
|
@ -2,6 +2,6 @@ DB_HOST = 127.0.0.1
|
|||
DB_NAME = catask
|
||||
DB_USER =
|
||||
DB_PASS =
|
||||
DB_PORT =
|
||||
DB_PORT = 3306
|
||||
ADMIN_PASSWORD =
|
||||
APP_SECRET =
|
||||
|
|
6
app.py
6
app.py
|
@ -44,11 +44,15 @@ def initDatabase():
|
|||
if error.errno == errorcode.ER_ACCESS_DENIED_ERROR:
|
||||
print("Bad credentials")
|
||||
elif error.errno == errorcode.ER_BAD_DB_ERROR:
|
||||
dbPort = os.environ.get("DB_PORT")
|
||||
if not dbPort:
|
||||
dbPort = 3306
|
||||
|
||||
conn = mysql.connector.connect(
|
||||
user=os.environ.get("DB_USER"),
|
||||
password=os.environ.get("DB_PASS"),
|
||||
host=os.environ.get("DB_HOST"),
|
||||
port=os.environ.get("DB_PORT"),
|
||||
port=dbPort,
|
||||
database='mysql'
|
||||
)
|
||||
cursor = conn.cursor()
|
||||
|
|
|
@ -2,6 +2,6 @@ antiSpamFile = 'wordlist.txt'
|
|||
blacklistFile = 'word_blacklist.txt'
|
||||
configFile = 'config.json'
|
||||
appName = 'CatAsk'
|
||||
version = '1.4.0'
|
||||
version = '1.4.1'
|
||||
# id (identifier) is to be interpreted as described in https://semver.org/#spec-item-9
|
||||
version_id = '-alpha'
|
||||
|
|
|
@ -44,6 +44,8 @@ dbUser = os.environ.get("DB_USER")
|
|||
dbPass = os.environ.get("DB_PASS")
|
||||
dbName = os.environ.get("DB_NAME")
|
||||
dbPort = os.environ.get("DB_PORT")
|
||||
if not dbPort:
|
||||
dbPort = 3306
|
||||
|
||||
def createDatabase(cursor, dbName):
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue