def deleteExceptions ( self, ch, zidx, resolution, annid ):
    """Delete a list of exceptions for this cuboid"""

    # if in a TxN us the transaction cursor.  Otherwise create one.
    if self.txncursor is None:
      cursor = self.conn.cursor()
    else:
      cursor = self.txncursor

    sql = "DELETE FROM {} WHERE zindex ={} AND id ={}".format( ch.getExceptionsTable(resolution), zidx, annid ) 
    try:
      cursor.execute ( sql )
    except MySQLdb.Error, e:
      logger.error ( (e.args[0], e.args[1], sql) % "Error deleting exceptions %d: %s. sql=%s")
      if self.txncursor is None:
        cursor.close()
      raise

    # commit if not in a txn
    if self.txncursor is None:
      self.conn.commit()
      cursor.close()
dataset/ETHPy150Open neurodata/ndstore/ocpca/mysqlkvio.py/MySQLKVIO.deleteExceptions/swapped operands of `%`