From 821f616cc35ac890a90aba43e1f8124201e5c4f3 Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau Date: Mon, 8 Nov 2021 09:22:17 +0100 Subject: code review: read_points_from_off_file already throws an exception when off file does not exist --- src/python/gudhi/alpha_complex.pyx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') diff --git a/src/python/gudhi/alpha_complex.pyx b/src/python/gudhi/alpha_complex.pyx index 446f4123..a4888914 100644 --- a/src/python/gudhi/alpha_complex.pyx +++ b/src/python/gudhi/alpha_complex.pyx @@ -16,8 +16,6 @@ from libcpp.utility cimport pair from libcpp.string cimport string from libcpp cimport bool from libc.stdint cimport intptr_t -import errno -import os import warnings from gudhi.simplex_tree cimport * @@ -82,10 +80,7 @@ cdef class AlphaComplex: if off_file: warnings.warn("off_file is a deprecated parameter, please consider using gudhi.read_points_from_off_file", DeprecationWarning) - if os.path.isfile(off_file): - points = read_points_from_off_file(off_file = off_file) - else: - raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), off_file) + points = read_points_from_off_file(off_file = off_file) # weights are set but is inconsistent with the number of points if weights != None and len(weights) != len(points): -- cgit v1.2.3