$DAMASK_ROOT takes precedence if defined in environment.

This commit is contained in:
Philip Eisenlohr 2011-11-03 13:55:17 +00:00
parent 9e3d7d7d6c
commit cac203939b
1 changed files with 3 additions and 3 deletions

View File

@ -9,11 +9,11 @@ class MSC_TOOLS():
'2005r3':[''], '2005r3':[''],
} }
def library_paths(self,callerPath=None,libRelation=''): def library_paths(self,callerPath='',libRelation=''):
import os import os
if callerPath: DamaskRoot = os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(callerPath)),libRelation)) if os.getenv('DAMASK_ROOT'): DamaskRoot = os.getenv('DAMASK_ROOT')
else: DamaskRoot = os.getenv('DAMASK_ROOT') else: DamaskRoot = os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(callerPath)),libRelation))
thePath = '' thePath = ''
try: # check for MSC.Mentat installation location try: # check for MSC.Mentat installation location