[cig-commits] r4021 - mc/3D/CitcomS/trunk/CitcomS

leif at geodynamics.org leif at geodynamics.org
Fri Jul 14 19:14:36 PDT 2006


Author: leif
Date: 2006-07-14 19:14:35 -0700 (Fri, 14 Jul 2006)
New Revision: 4021

Modified:
   mc/3D/CitcomS/trunk/CitcomS/SimpleApp.py
Log:
Bug fix in _getPrivateDepositoryLocations(); updated usage().


Modified: mc/3D/CitcomS/trunk/CitcomS/SimpleApp.py
===================================================================
--- mc/3D/CitcomS/trunk/CitcomS/SimpleApp.py	2006-07-14 23:55:40 UTC (rev 4020)
+++ mc/3D/CitcomS/trunk/CitcomS/SimpleApp.py	2006-07-15 02:14:35 UTC (rev 4021)
@@ -101,10 +101,7 @@
 
 
     def usage(self):
-        name = 'citcomsregional.sh'
-        if self.inventory.solver.name == 'full':
-            name = 'citcomsfull.sh'
-        print 'usage: %s [<property>=<value>] [<facility>.<property>=<value>] ...' % name
+        print 'usage: citcoms [<property>=<value>] [<facility>.<property>=<value>] ...'
         self.showUsage()
         print """\
 For more information about a particular component:
@@ -131,15 +128,20 @@
 
 
     def _getPrivateDepositoryLocations(self):
+        from os.path import dirname, isdir, join
         list = []
-        try:
-            from config import makefile
-            list.append(makefile['pkgsysconfdir'])
-        except ImportError, KeyError:
+        etc = join(dirname(dirname(__file__)), 'etc')
+        if isdir(etc):
             # The user is running directly from the source directory.
-            from os.path import dirname, join
-            etc = join(dirname(dirname(__file__)), 'etc')
             list.append(etc)
+        else:
+            try:
+                from config import makefile
+                pkgsysconfdir = makefile['pkgsysconfdir']
+                if isdir(pkgsysconfdir):
+                    list.append(pkgsysconfdir)
+            except ImportError, KeyError:
+                pass
         return list
 
 



More information about the cig-commits mailing list