déja ca a fix le problème de lancement je pense

This commit is contained in:
piair
2023-08-25 11:43:09 +02:00
parent bfab01a1a3
commit 79e6d9053e
5 changed files with 15 additions and 38 deletions

View File

@ -63,8 +63,7 @@ with open("/app/MsRewards-Reborn/user_data/proxy.json", "r") as inFile:
proxy = json.load(inFile)
with open("/app/MsRewards-Reborn/user_data/configs.json", "r") as inFile:
config = json.load(inFile)
with open("/app/MsRewards-Reborn/user_data/database.json", "r") as inFile:
database = json.load(inFile)
args = parser.parse_args()
@ -114,19 +113,6 @@ if g.proxy_enabled :
g.proxy_address = proxy[config[args.config]["proxy"]]["address"]
g.proxy_port = proxy[config[args.config]["proxy"]]["port"]
# MySQL settings
g.sql_enabled = database["checked"] == "checked"
g.sql_usr = database["usr"]
g.sql_pwd = database["pwd"]
g.sql_host = database["host"]
g.sql_database = database["table"]
try :
g.database_error_override = config["OTHER"]["database_override"] == "True"
except :
pass
g.fast = False

View File

@ -1,7 +1,6 @@
import sqlite3
#Create a new row, for the account [compte] whith [points] points
#SQLITE
def add_row(compte, points, mycursor, mydb):
sql = "INSERT INTO daily (compte, points, date) VALUES (?, ?, date())"
val = (compte, points)
@ -11,7 +10,6 @@ def add_row(compte, points, mycursor, mydb):
#update the ammount of points for the account [compte]
#SQLITE
def update_row(compte, points, mycursor, mydb):
sql = f"UPDATE daily SET points = {points} WHERE compte = '{compte}' AND date = date() ;"
mycursor.execute(sql)