Fixes in jsutils and cleaning mysql code
This commit is contained in:
parent
189f3ffcce
commit
5fa28920da
2 changed files with 10 additions and 5 deletions
|
|
@ -46,6 +46,7 @@ class SqlClass:
|
|||
self.conn=None
|
||||
self.connected=False
|
||||
self.pool_recycle=3600
|
||||
self.last_query=''
|
||||
self.connect()
|
||||
|
||||
|
||||
|
|
@ -173,16 +174,20 @@ class SqlClass:
|
|||
|
||||
cursor.execute(sql_query, arguments)
|
||||
self.conn.commit()
|
||||
|
||||
#if hasattr(cursor, '_executed'):
|
||||
# self.last_query=cursor._executed
|
||||
|
||||
return cursor
|
||||
|
||||
except:
|
||||
e = sys.exc_info()[0]
|
||||
v = sys.exc_info()[1]
|
||||
|
||||
if hasattr(cursor, '_last_executed'):
|
||||
sql_query=cursor._last_executed
|
||||
#if hasattr(cursor, '_executed'):
|
||||
# self.last_query=cursor._executed
|
||||
|
||||
self.error_connection="Error in query ||%s||Values: %s" % (sql_query, str(arguments))
|
||||
self.error_connection="Error in query ||%s||Values: %s" % (self.last_query, str(arguments))
|
||||
|
||||
self.conn.close()
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 1dcbd599d9d11f16c10c5a377c82bfb652694037
|
||||
Subproject commit f3175777e395281e50ea05898a5db768e054d4a3
|
||||
Loading…
Add table
Add a link
Reference in a new issue