auto-close cursor when using sqlalchemy and no row returned in fetchOneRow()