def _get_address_scope(self, context, id): try: return self._get_by_id(context, AddressScope, id) except exc.NoResultFound: raise ext_address_scope.AddressScopeNotFound(address_scope_id=id)
def _get_address_scope(self, context, id): obj = obj_addr_scope.AddressScope.get_object(context, id=id) if obj is None: raise ext_address_scope.AddressScopeNotFound(address_scope_id=id) return obj