Request

25 views
Skip to first unread message

r rad

unread,
Aug 19, 2026, 4:50:22 AMAug 19
to Jam.py Users Mailing List
Please, try to inspect this code:

def execute(self, query, params=None, connection=None, db=None):
# ~ print (query, params)
error = None
con = connection
if not connection:
con = self.connect()
cursor = con.cursor()
try:
if type(query) == list:
self.__execute_query_list(cursor, query)
else:
self.execute_query(cursor, query, params)
except Exception as x:
error = error_message(x)
finally:
if not connection:
con.commit()
con.close()
return error

from items.py v7.

Is it correct? I think, that follow try code is OK:

try:
self.execute_query(cursor, query, params)
con.commit()
except Exception as error:
con.rollback()
error = error_message(error)
finally:
if not connection:
con.close()

Dean D. Babic

unread,
Aug 19, 2026, 7:04:11 AMAug 19
to Jam.py Users Mailing List
I think this is not the place to discuss the core Jam.py code. 
The proper channel is github issues. Which then is linked to a pull request.
This is documented btw: https://jampy-docs.readthedocs.io/projects/V7/en/latest/admin/customisation.html
You are more then welcome to submit patches which are tested. The server code is also there for testing.
Reply all
Reply to author
Forward
0 new messages