Author: johannes
Date: 2005-06-21 03:11:47 -0500 (Tue, 21 Jun 2005)
New Revision: 7633
Modified:
trunk/gnue-common/src/datasources/readgsd.py
Log:
Don't try to import data if schema update has been canceled
Modified: trunk/gnue-common/src/datasources/readgsd.py
===================================================================
--- trunk/gnue-common/src/datasources/readgsd.py 2005-06-20 21:19:40 UTC
(rev 7632)
+++ trunk/gnue-common/src/datasources/readgsd.py 2005-06-21 08:11:47 UTC
(rev 7633)
@@ -164,15 +164,19 @@
def run (self):
"""
+ Check the options given on the command line, load all gsd files and import
+ their schema/data according to the command line options.
"""
self.__checkOptions ()
self.__loadInputFiles ()
+ proceed = True
+
if self.__doSchema:
- self.__importSchema ()
+ proceed = self.__importSchema ()
- if self.__doData:
+ if proceed and self.__doData:
self.__importData ()
@@ -257,7 +261,7 @@
if self.__ask (u_("You are about to create the new database '%s'. " \
"Continue") % self.connection.name,
[u_("y"), u_("n")], "n") == u_("n"):
- return
+ return False
self.connection.createDatabase ()
@@ -266,7 +270,7 @@
if not simulation:
if self.__ask (u_("You are about to change the database '%s'. Continue")
\
% self.connection.name, [u_("y"), u_("n")], u_("n")) == u_("n"):
- return
+ return False
self.connections.loginToConnection (self.connection)
@@ -283,7 +287,9 @@
finally:
dest.close ()
+ return True
+
# ---------------------------------------------------------------------------
# Import the given <data>
# ---------------------------------------------------------------------------
_______________________________________________
Commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue