Skip to content

Commit 2b1aa2f

Browse files
committed
Don't load shp from sentinel
1 parent 1bb2e38 commit 2b1aa2f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

shapefile.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,14 +1115,12 @@ def __init__(
11151115
self.load(path)
11161116
return
11171117

1118-
self.shp = self._seek_0_on_file_obj_wrap_or_open_from_name("shp", shp)
1119-
self.dbf = self._seek_0_on_file_obj_wrap_or_open_from_name("dbf", dbf)
1120-
1121-
if shp is _NoShpSentinel:
1122-
self.shx = None
1123-
else:
1118+
if shp is not _NoShpSentinel:
1119+
self.shp = self._seek_0_on_file_obj_wrap_or_open_from_name("shp", shp)
11241120
self.shx = self._seek_0_on_file_obj_wrap_or_open_from_name("shx", shx)
11251121

1122+
self.dbf = self._seek_0_on_file_obj_wrap_or_open_from_name("dbf", dbf)
1123+
11261124
# Load the files
11271125
if self.shp or self.dbf:
11281126
self._try_to_set_constituent_file_headers()

0 commit comments

Comments
 (0)