SQLAlchemy Query.all() method doesn't raise NoResultFound
exception in case if no result is found but rather returns
an empty list. So this pattern which is common for our code
doesn't make sense and should be fixed:
try:
dns_qry = context.session.query(models_v2.DNSNameServer)
return dns_qry.filter_by(subnet_id=subnet_id).all()
except exc.NoResultFound:
return []
Fixes bug 1173131.
Change-Id: I19b64eecd6edac0dba7dd0bf2ab32690c46e4f8b