def safe_find_sr(session):
 sr_ref = _find_sr(session)
 if (sr_ref is None):
  raise exception.StorageRepositoryNotFound()
 return sr_ref

def safe_find_sr ( session ) : sr_ref = _find_sr ( session ) if ( sr_ref is None ) : raise exception . StorageRepositoryNotFound ( ) return sr_ref
same as _find_sr except raises a notfound exception if sr cannot be determined .