Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {'interval': 300, 'size': 5}
- None
- settings = {}
- conn = mariadb.connect(host=db_host, user=db_user, password=db_password, database="my_db")
- cursor = conn.cursor()
- try:
- cursor.execute("SELECT name, value FROM settings")
- results = cursor.fetchall()
- except mariadb.Error as error:
- logger.sendLog("ERROR RETRIEVING GLOBAL SETTINGS FOR ({})".format(environment))
- conn.close()
- for name, value in results:
- settings["{}".format(name)] = value
- print(settings)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement