]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Do not create symlink is os module has no attribute symlink
authorCamille GOUTTEBROZE <camille.gouttebroze@cea.fr>
Fri, 29 Aug 2014 14:05:54 +0000 (16:05 +0200)
committerCamille GOUTTEBROZE <camille.gouttebroze@cea.fr>
Fri, 29 Aug 2014 14:05:54 +0000 (16:05 +0200)
bin/virtual_salome.py

index 5ab9924a1e7dc57348da048f6119b18d571cde06..f7d39c80f718ddf489145f50b9fb02cbb9625026 100755 (executable)
@@ -62,7 +62,11 @@ def symlink(src, dest):
         if verbose:
             print 'Creating symlink %s' % dest
             pass
-        os.symlink(src, dest)
+        if hasattr(os,"symlink") :
+            os.symlink(src, dest)
+        else :
+            print "Do not create symlink %s. It is impossible on %s." % ( dest, sys.platform )
+            return
     else:
         if verbose:
             print 'Symlink %s already exists' % dest