diff --git a/doc/howto_writecook.md b/doc/howto_writecook.md index 1ebb360..e2770b5 100644 --- a/doc/howto_writecook.md +++ b/doc/howto_writecook.md @@ -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" diff --git a/sql.py b/sql.py index efd3cf6..28b551f 100644 --- a/sql.py +++ b/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'}