Skip to content
Snippets Groups Projects
Commit 179f1dbb authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Do not write a message for opening a shapefile

This was polluting standard output. So we have to add the shapefile
path when it is not found.
parent 8bba3d80
No related branches found
No related tags found
No related merge requests found
......@@ -131,13 +131,12 @@ class SHPC_class:
if layer not in self._readers[i_slice][orientation]:
my_shapefile = path.join(self.dir, f"Slice_{i_slice}", orientation,
layer)
print("Opening", my_shapefile, "...")
try:
self._readers[i_slice][orientation][layer] \
= shapefile.Reader(my_shapefile)
except shapefile.ShapefileException:
print("Not found")
print(f"get_reader: {my_shapefile} not found")
self._readers[i_slice][orientation][layer] = None
return self._readers[i_slice][orientation][layer]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment