[cig-commits] commit: Forgot to handle situations where potential

Mercurial hg at geodynamics.org
Mon Nov 24 11:27:53 PST 2008


changeset:   12:e264c341ce76
user:        LukeHodkinson
date:        Fri Jun 27 05:54:50 2008 +0000
files:       SConfig/packages/PETScExt.py
description:
Forgot to handle situations where potential
PETScExt installations turn out to be invalid.


diff -r d2229a86cf7d -r e264c341ce76 SConfig/packages/PETScExt.py
--- a/SConfig/packages/PETScExt.py	Thu Jun 26 06:35:40 2008 +0000
+++ b/SConfig/packages/PETScExt.py	Fri Jun 27 05:54:50 2008 +0000
@@ -18,9 +18,14 @@ class PETScExt(SConfig.Package):
     def process_installation(self, inst):
         # Have to get the architecture using this garbage...
         archs = os.listdir(os.path.join(inst.base_dir, 'lib'))
+        found_arch = False
         for arch in archs:
             if arch[0] != '.':
+                found_arch = True
                 inst.arch = arch
+                break
+        if not found_arch:
+            return False
 
         # Add the bmake/arch include directory.
         hdr_dir = os.path.join('bmake', inst.arch)



More information about the CIG-COMMITS mailing list