/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/Model/load.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/Model/load.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2446 by frank, Mon Dec 13 11:52:34 2004 UTC revision 2449 by frank, Mon Dec 13 13:37:40 2004 UTC
# Line 261  class SessionLoader(XMLReader): Line 261  class SessionLoader(XMLReader):
261          return normalized          return normalized
262    
263      def open_shapefile(self, filename):      def open_shapefile(self, filename):
264          """Open shapefile, eventually with alternative path."""          """Open shapefile, with alternative path handling.
265            
266               If a shapefile cannot be opened and an IOError is raised, check for
267               an alternative. This alternative can be specified interactively by
268               the user or taken from a list of (potential) locations, depending on
269               the callback implementation.
270                
271               The alternative is rechecked. If taken from a list the user
272               has to confirm the alternative.
273            """
274    
275            # Flag if the alternative path was specified interactively / from list.
276          from_list = 0          from_list = 0
277          while 1:          while 1:
278              try:              try:
279                  store = self.theSession.OpenShapefile(filename)                  store = self.theSession.OpenShapefile(filename)
280                  if from_list:                  if from_list:
281                      # The correct? path has been guessed from a list                      # A valid path has been guessed from a list
282                      # Let the user confirm - or select an alternative.                      # Let the user confirm - or select an alternative.
283                      filename, from_list = self.shapefile_callback(                      filename, from_list = self.shapefile_callback(
284                                              filename, "check")                                              filename, "check")

Legend:
Removed from v.2446  
changed lines
  Added in v.2449

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26