Author: bugman
Date: Fri Sep  1 13:50:52 2006
New Revision: 2548

URL: http://svn.gna.org/viewcvs/relax?rev=2548&view=rev
Log:
Added a try statement to catch the ImportError failure of the 'lstat' and 
'symlink' functions of the
'os' module within the 'sconstruct' script.

This is a fix for bug #6841 
(https://gna.org/bugs/?func=detailitem&item_id=6841) which was reported
by Daniel Perez in the post at 
https://mail.gna.org/public/relax-users/2006-09/msg00000.html
(Message-id: <[EMAIL PROTECTED]>).  The sconstruct function problems were 
identified
by Chris MacRaild at 
https://mail.gna.org/public/relax-users/2006-09/msg00003.html (Message-id:
<[EMAIL PROTECTED]>).

This import statement fails under MS Windows as the symlink 'os' functions are 
UNIX only.


Modified:
    1.2/sconstruct

Modified: 1.2/sconstruct
URL: 
http://svn.gna.org/viewcvs/relax/1.2/sconstruct?rev=2548&r1=2547&r2=2548&view=diff
==============================================================================
--- 1.2/sconstruct (original)
+++ 1.2/sconstruct Fri Sep  1 13:50:52 2006
@@ -28,13 +28,20 @@
 # Import statements.
 from glob import glob
 import platform
-from os import F_OK, access, chdir, getcwd, lstat, path, remove, rmdir, sep, 
symlink, system, walk
+from os import F_OK, access, chdir, getcwd, path, remove, rmdir, sep, system, 
walk
 from re import search
 from shutil import copytree, move
 import sys
 from tarfile import TarFile
 
 from version import version
+
+# UNIX only functions from the os module.
+try:
+    from os import lstat, symlink
+except ImportError:
+    pass
+
 
 
 class Main:


_______________________________________________
relax (http://nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to