mirror of
https://gitlab.com/JKANetwork/powerfulcomputermanager.git
synced 2026-02-24 22:13:43 +01:00
First fix, SQL log errata deny all updates
This commit is contained in:
@@ -6,7 +6,7 @@ First: Name, a line like below, with the name
|
||||
Then, the revision number, when this number changes, cook will be reapplied
|
||||
"revision: 1"
|
||||
If the cook has to run everytime client is called (And not only one time per new revision), you have to add:
|
||||
"runever: 1" (1-> Everytime; 0 or no line: Run only one time)
|
||||
"runever: 1" (1-> Everytime, if you change to 0 or delete, it will not do it)
|
||||
And then, steps. First a "steps:" line, and then line by line the steps of the cook
|
||||
"steps:
|
||||
- PWCMD|White-Output "Hello World"
|
||||
|
||||
9
sql.py
9
sql.py
@@ -1,3 +1,4 @@
|
||||
# Build 2
|
||||
import sqlite3
|
||||
import sysopt #File of options
|
||||
from shutil import copyfile
|
||||
@@ -34,12 +35,16 @@ def select(query):
|
||||
def insert(query):
|
||||
conn = sqlite3.connect('BD/database.db')
|
||||
if sysopt.debugsql==True:
|
||||
logit(query)
|
||||
logit("SQL: "+query)
|
||||
try:
|
||||
c = conn.cursor()
|
||||
c.execute("SQL: "+query)
|
||||
c.execute(query)
|
||||
conn.commit()
|
||||
conn.close()
|
||||
if sysopt.debugsql==True:
|
||||
logit("SQL Ok")
|
||||
return {'RESULT': 'OK'}
|
||||
except:
|
||||
if sysopt.debugsql==True:
|
||||
logit("SQL Error")
|
||||
return {'RESULT': 'SQLite3 Error'}
|
||||
|
||||
Reference in New Issue
Block a user