From: Camille GOUTTEBROZE Date: Fri, 29 Aug 2014 14:05:54 +0000 (+0200) Subject: Do not create symlink is os module has no attribute symlink X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bf9dae761420bfbe62e2fdf5951005952bb16153;p=modules%2Fkernel.git Do not create symlink is os module has no attribute symlink --- diff --git a/bin/virtual_salome.py b/bin/virtual_salome.py index 5ab9924a1..f7d39c80f 100755 --- a/bin/virtual_salome.py +++ b/bin/virtual_salome.py @@ -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