diff --git a/processing/post/postResults b/processing/post/postResults index f45609443..c7bf7eab4 100755 --- a/processing/post/postResults +++ b/processing/post/postResults @@ -9,29 +9,6 @@ releases = {'2010':['linux64',''], '2005r3':[''], } -try: - file = open('%s/../MSCpath'%os.path.dirname(os.path.realpath(sys.argv[0]))) - MSCpath = os.path.normpath(file.readline().strip()) - file.close() -except: - MSCpath = '/msc' - -for release,subdirs in sorted(releases.items(),reverse=True): - for subdir in subdirs: - libPath = '%s/mentat%s/shlib/%s'%(MSCpath,release,subdir) - if os.path.exists(libPath): - sys.path.append(libPath) - break - else: - continue - break - -try: - from py_post import * -except: - print('error: no valid Mentat release found in %s'%MSCpath) - sys.exit(-1) - # ----------------------------- class vector: # mimic py_post node object @@ -650,6 +627,32 @@ parser.set_defaults(separateFiles = False) (options, file) = parser.parse_args() + +try: + file = open('%s/../MSCpath'%os.path.dirname(os.path.realpath(sys.argv[0]))) + MSCpath = os.path.normpath(file.readline().strip()) + file.close() +except: + MSCpath = '/msc' + +for release,subdirs in sorted(releases.items(),reverse=True): + for subdir in subdirs: + libPath = '%s/mentat%s/shlib/%s'%(MSCpath,release,subdir) + if os.path.exists(libPath): + sys.path.append(libPath) + break + else: + continue + break + +try: + from py_mentat import * +except: + if options.filetype == 'marc': + print('no valid Mentat release found in %s'%MSCpath) + sys.exit(-1) + + bg = backgroundMessage() bg.start()