mirror of
https://github.com/donaldzou/WGDashboard
synced 2025-02-26 05:58:47 +00:00
Update dashboard.py
This commit is contained in:
parent
e58b1d670b
commit
9bd394f351
@ -1629,10 +1629,12 @@ def sqlSelect(statement: str, paramters: tuple = ()) -> sqlite3.Cursor:
|
|||||||
try:
|
try:
|
||||||
cursor = sqldb.cursor()
|
cursor = sqldb.cursor()
|
||||||
return cursor.execute(statement, paramters)
|
return cursor.execute(statement, paramters)
|
||||||
|
|
||||||
except sqlite3.OperationalError as error:
|
except sqlite3.OperationalError as error:
|
||||||
print("[WGDashboard] SQLite Error:" + str(error) + " | Statement: " + statement)
|
print("[WGDashboard] SQLite Error:" + str(error) + " | Statement: " + statement)
|
||||||
return []
|
return []
|
||||||
|
except Exception as e:
|
||||||
|
print("[WGDashboard] SQLite Error:" + str(error) + " | Statement: " + statement)
|
||||||
|
return []
|
||||||
|
|
||||||
|
|
||||||
def sqlUpdate(statement: str, paramters: tuple = ()) -> sqlite3.Cursor:
|
def sqlUpdate(statement: str, paramters: tuple = ()) -> sqlite3.Cursor:
|
||||||
@ -1645,6 +1647,9 @@ def sqlUpdate(statement: str, paramters: tuple = ()) -> sqlite3.Cursor:
|
|||||||
sqldb.commit()
|
sqldb.commit()
|
||||||
except sqlite3.OperationalError as error:
|
except sqlite3.OperationalError as error:
|
||||||
print("[WGDashboard] SQLite Error:" + str(error) + " | Statement: " + statement)
|
print("[WGDashboard] SQLite Error:" + str(error) + " | Statement: " + statement)
|
||||||
|
except Exception as e:
|
||||||
|
print("[WGDashboard] SQLite Error:" + str(error) + " | Statement: " + statement)
|
||||||
|
return []
|
||||||
|
|
||||||
DashboardConfig = DashboardConfig()
|
DashboardConfig = DashboardConfig()
|
||||||
_, APP_PREFIX = DashboardConfig.GetConfig("Server", "app_prefix")
|
_, APP_PREFIX = DashboardConfig.GetConfig("Server", "app_prefix")
|
||||||
|
Loading…
Reference in New Issue
Block a user