File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -913,6 +913,12 @@ class ShapefileException(Exception):
913913
914914
915915class _NoShpSentinel (object ):
916+ """For use as a default value for shp to preserve the
917+ behaviour (from when all keyword args were gathered
918+ in the **kwargs dict) in case someone explictly
919+ called Reader(shp=None) to load self.shx.
920+ """
921+
916922 pass
917923
918924
@@ -1106,15 +1112,14 @@ def __init__(
11061112 self .load (path )
11071113 return
11081114
1115+ self .shp = self ._seek_0_on_file_obj_wrap_or_open_from_name ("shp" , shp )
1116+ self .dbf = self ._seek_0_on_file_obj_wrap_or_open_from_name ("dbf" , dbf )
1117+
11091118 if shp is _NoShpSentinel :
1110- self .shp = None
11111119 self .shx = None
11121120 else :
1113- self .shp = self ._seek_0_on_file_obj_wrap_or_open_from_name ("shp" , shp )
11141121 self .shx = self ._seek_0_on_file_obj_wrap_or_open_from_name ("shx" , shx )
11151122
1116- self .dbf = self ._seek_0_on_file_obj_wrap_or_open_from_name ("dbf" , dbf )
1117-
11181123 # Load the files
11191124 if self .shp or self .dbf :
11201125 self ._try_to_set_constituent_file_headers ()
You can’t perform that action at this time.
0 commit comments