equal
deleted
inserted
replaced
709 """Execute a query. |
709 """Execute a query. |
710 it's a function just so that it shows up in profiling |
710 it's a function just so that it shows up in profiling |
711 """ |
711 """ |
712 cursor = cnx.cnxset.cu |
712 cursor = cnx.cnxset.cu |
713 if server.DEBUG & server.DBG_SQL: |
713 if server.DEBUG & server.DBG_SQL: |
714 cnx = cnx.cnxset.cnx |
714 print 'exec', query, args, cnx.cnxset.cnx |
715 # getattr to get the actual connection if cnx is a CnxLoggingWrapper |
|
716 # instance |
|
717 print 'exec', query, args, getattr(cnx, '_cnx', cnx) |
|
718 try: |
715 try: |
719 # str(query) to avoid error if it's a unicode string |
716 # str(query) to avoid error if it's a unicode string |
720 cursor.execute(str(query), args) |
717 cursor.execute(str(query), args) |
721 except Exception as ex: |
718 except Exception as ex: |
722 if self.repo.config.mode != 'test': |
719 if self.repo.config.mode != 'test': |