Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try:
- result = db.engine.execute(query).fetchall()
- return [r for r in result]
- except sql.exceptions.NoSuchTableError, msg:
- LOG.error("NoSuchTableError %s" % msg)
- except sql.exceptions.ArgumentError, msg:
- LOG.error("ArgumentError %s" % msg)
- except sql.exceptions.InvalidRequestError, msg:
- LOG.error("InvalidRequestError %s" % msg)
- except:
- LOG.error(query)
- LOG.error("Unexpected error: %s" % sys.exc_info()[0])
Add Comment
Please, Sign In to add comment