mailr6332 - in /1.3: dep_check.py relax


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on June 08, 2008 - 01:49:
Author: bugman
Date: Sun Jun  8 01:49:47 2008
New Revision: 6332

URL: http://svn.gna.org/viewcvs/relax?rev=6332&view=rev
Log:
Shifted the C module import error to after the program introduction string.


Modified:
    1.3/dep_check.py
    1.3/relax

Modified: 1.3/dep_check.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/dep_check.py?rev=6332&r1=6331&r2=6332&view=diff
==============================================================================
--- 1.3/dep_check.py (original)
+++ 1.3/dep_check.py Sun Jun  8 01:49:47 2008
@@ -124,12 +124,11 @@
     if system == 'Windows' or system == 'Microsoft':
         file = 'relax_fit.pyd'
     if not access('maths_fns' + sep + file, F_OK):
-        sys.stderr.write("\nImportError: relaxation curve fitting is 
unavailable, the corresponding C modules have not been compiled.\n")
+        C_module_exp_fn_mesg = "ImportError: relaxation curve fitting is 
unavailable, the corresponding C modules have not been compiled."
 
-    # Error print out.
+    # Show the full error.
     else:
-        sys.stderr.write("\nImportError: " + message[0])
-        sys.stderr.write("\nRelaxation curve fitting is unavailable, try 
compiling the C modules.")
+        C_module_exp_fn_mesg = "ImportError: " + message[0] + "\nRelaxation 
curve fitting is unavailable, try compiling the C modules."
 
     # Set the flag.
     C_module_exp_fn = False

Modified: 1.3/relax
URL: 
http://svn.gna.org/viewcvs/relax/1.3/relax?rev=6332&r1=6331&r2=6332&view=diff
==============================================================================
--- 1.3/relax (original)
+++ 1.3/relax Sun Jun  8 01:49:47 2008
@@ -339,6 +339,10 @@
             intro_string = intro_string + "and comes with absolutely no 
warranty.  For details type 'GPL'.  Assistance in using this program\n"
             intro_string = intro_string + "can be accessed by typing 
'help'.\n"
 
+        # ImportErrors, if any.
+        if not dep_check.C_module_exp_fn:
+            intro_string = intro_string + "\n" + 
dep_check.C_module_exp_fn_mesg + "\n"
+
         # Return the string.
         return intro_string
 




Related Messages


Powered by MHonArc, Updated Sun Jun 08 13:00:17 2008