mailr2548 - /1.2/sconstruct


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

Header


Content

Posted by edward on September 01, 2006 - 13:51:
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: <44F7FFCF.4060102@xxxxxxxxxxxxxxxx>).  The sconstruct function 
problems were identified
by Chris MacRaild at 
https://mail.gna.org/public/relax-users/2006-09/msg00003.html (Message-id:
<1157109851.28764.964.camel@fbsdpcu021>).

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:




Related Messages


Powered by MHonArc, Updated Sun Sep 03 07:20:04 2006