frank: thuban/Thuban/Model load.py,1.50,1.51
cvs@intevation.de
cvs at intevation.de
Mon Dec 13 14:37:42 CET 2004
Author: frank
Update of /thubanrepository/thuban/Thuban/Model
In directory doto:/tmp/cvs-serv8277/Thuban/Model
Modified Files:
load.py
Log Message:
Updated docstring for SessionLoader.open_shapefile
Index: load.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/Model/load.py,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- load.py 13 Dec 2004 11:52:34 -0000 1.50
+++ load.py 13 Dec 2004 13:37:40 -0000 1.51
@@ -261,13 +261,24 @@
return normalized
def open_shapefile(self, filename):
- """Open shapefile, eventually with alternative path."""
+ """Open shapefile, with alternative path handling.
+
+ If a shapefile cannot be opened and an IOError is raised, check for
+ an alternative. This alternative can be specified interactively by
+ the user or taken from a list of (potential) locations, depending on
+ the callback implementation.
+
+ The alternative is rechecked. If taken from a list the user
+ has to confirm the alternative.
+ """
+
+ # Flag if the alternative path was specified interactively / from list.
from_list = 0
while 1:
try:
store = self.theSession.OpenShapefile(filename)
if from_list:
- # The correct? path has been guessed from a list
+ # A valid path has been guessed from a list
# Let the user confirm - or select an alternative.
filename, from_list = self.shapefile_callback(
filename, "check")
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)