We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bb2e38 commit 2b1aa2fCopy full SHA for 2b1aa2f
shapefile.py
@@ -1115,14 +1115,12 @@ def __init__(
1115
self.load(path)
1116
return
1117
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:
+ if shp is not _NoShpSentinel:
+ self.shp = self._seek_0_on_file_obj_wrap_or_open_from_name("shp", shp)
1124
self.shx = self._seek_0_on_file_obj_wrap_or_open_from_name("shx", shx)
1125
+ self.dbf = self._seek_0_on_file_obj_wrap_or_open_from_name("dbf", dbf)
+
1126
# Load the files
1127
if self.shp or self.dbf:
1128
self._try_to_set_constituent_file_headers()
0 commit comments