commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r8223 - trunk/gnue-common/src/datasources


From: jamest
Subject: [gnue] r8223 - trunk/gnue-common/src/datasources
Date: Sun, 12 Mar 2006 13:58:09 -0600 (CST)

Author: jamest
Date: 2006-03-12 13:58:09 -0600 (Sun, 12 Mar 2006)
New Revision: 8223

Modified:
   trunk/gnue-common/src/datasources/readgsd.py
Log:
minor comments while digging thru code


Modified: trunk/gnue-common/src/datasources/readgsd.py
===================================================================
--- trunk/gnue-common/src/datasources/readgsd.py        2006-03-12 19:13:58 UTC 
(rev 8222)
+++ trunk/gnue-common/src/datasources/readgsd.py        2006-03-12 19:58:09 UTC 
(rev 8223)
@@ -199,10 +199,16 @@
   # ---------------------------------------------------------------------------
 
   def __checkOptions (self):
-
+    """
+    Process the command line arguments
+    
+    Builds a list of file handles to process and validates that the 
+    command line option combinations are valid.
+    """
     if not self.ARGUMENTS:
       raise GBaseApp.StartupError, u_("No input file specified.")
 
+    # Build file handle list --------------------------------------------------
     try:
       self._files = []
 
@@ -214,12 +220,14 @@
           u_("Unable to open input file: %s") % errors.getException () [2]
 
 
+    # Setup ouput file if requested -------------------------------------------
     self.outfile = self.OPTIONS ['output']
 
     if self.OPTIONS ['file-only'] and self.outfile is None:
       raise GBaseApp.StartupError, \
           u_("Output to file only requested, but no filename specified.")
 
+    # Determine which processing steps are executed ---------------------------
     self.__doSchema = self.OPTIONS ['mode'].lower () in ['both', 'schema']
     self.__doData   = self.OPTIONS ['mode'].lower () in ['both', 'data'] and \
                           not self.OPTIONS ['file-only']
@@ -228,9 +236,11 @@
       raise GBaseApp.StartupError, \
           u_("Mode of operation must be one of 'both', 'schema' or 'data'.")
 
+    # Setup the connection ----------------------------------------------------
     cName = self.OPTIONS ['connection']
     self.connection = self.connections.getConnection (cName)
 
+    # Authentication ----------------------------------------------------------
     # if a username is given on the command line we pass both username and
     # password to the connection parameters. If the password is not set, it
     # defaults to 'gnue'.
@@ -252,8 +262,9 @@
   # ---------------------------------------------------------------------------
 
   def __loadInputFiles (self):
-    
-    # Build up a single object tree from all input files
+    """
+    Builds a schema from the list of input filehandles stored in self._files
+    """
     self._schema = None
     for stream in self._files:
       xmltree = GSchema.loadFile (stream)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]