mirror of
https://gitlab.com/JKANetwork/powerfulcomputermanager.git
synced 2026-02-26 15:03:45 +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
|
Then, the revision number, when this number changes, cook will be reapplied
|
||||||
"revision: 1"
|
"revision: 1"
|
||||||
If the cook has to run everytime client is called (And not only one time per new revision), you have to add:
|
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
|
And then, steps. First a "steps:" line, and then line by line the steps of the cook
|
||||||
"steps:
|
"steps:
|
||||||
- PWCMD|White-Output "Hello World"
|
- PWCMD|White-Output "Hello World"
|
||||||
|
|||||||
9
sql.py
9
sql.py
@@ -1,3 +1,4 @@
|
|||||||
|
# Build 2
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import sysopt #File of options
|
import sysopt #File of options
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
@@ -34,12 +35,16 @@ def select(query):
|
|||||||
def insert(query):
|
def insert(query):
|
||||||
conn = sqlite3.connect('BD/database.db')
|
conn = sqlite3.connect('BD/database.db')
|
||||||
if sysopt.debugsql==True:
|
if sysopt.debugsql==True:
|
||||||
logit(query)
|
logit("SQL: "+query)
|
||||||
try:
|
try:
|
||||||
c = conn.cursor()
|
c = conn.cursor()
|
||||||
c.execute("SQL: "+query)
|
c.execute(query)
|
||||||
conn.commit()
|
conn.commit()
|
||||||
conn.close()
|
conn.close()
|
||||||
|
if sysopt.debugsql==True:
|
||||||
|
logit("SQL Ok")
|
||||||
return {'RESULT': 'OK'}
|
return {'RESULT': 'OK'}
|
||||||
except:
|
except:
|
||||||
|
if sysopt.debugsql==True:
|
||||||
|
logit("SQL Error")
|
||||||
return {'RESULT': 'SQLite3 Error'}
|
return {'RESULT': 'SQLite3 Error'}
|
||||||
|
|||||||
Reference in New Issue
Block a user