summaryrefslogtreecommitdiff
path: root/src/python/gudhi/alpha_complex.pyx
diff options
context:
space:
mode:
authorVincent Rouvreau <vincent.rouvreau@inria.fr>2021-11-08 09:22:17 +0100
committerVincent Rouvreau <vincent.rouvreau@inria.fr>2021-11-08 09:22:17 +0100
commit821f616cc35ac890a90aba43e1f8124201e5c4f3 (patch)
tree724b73b2492cf590048a21d1070f7787efc422fe /src/python/gudhi/alpha_complex.pyx
parent63aadb9a9eca849e1d7557fdced3bc6874426eb1 (diff)
code review: read_points_from_off_file already throws an exception when off file does not exist
Diffstat (limited to 'src/python/gudhi/alpha_complex.pyx')
-rw-r--r--src/python/gudhi/alpha_complex.pyx7
1 files changed, 1 insertions, 6 deletions
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):