Commit 0a07efe8 authored by Jim Fulton's avatar Jim Fulton

I think I finally got it right.

parent d6170672
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
"""Global definitions""" """Global definitions"""
__version__='$Revision: 1.32 $'[11:-2] __version__='$Revision: 1.33 $'[11:-2]
import sys, os import sys, os
from DateTime import DateTime from DateTime import DateTime
...@@ -103,17 +103,13 @@ try: home=os.environ['SOFTWARE_HOME'] ...@@ -103,17 +103,13 @@ try: home=os.environ['SOFTWARE_HOME']
except: except:
import Products import Products
home=package_home(Products.__dict__) home=package_home(Products.__dict__)
d,e=os.path.split(home) if not os.path.isabs(home):
if d: home=os.path.join(os.getcwd(), home)
if d[:1] == '.':
home=os.getcwd() home,e=os.path.split(home)
if d[:2] == '..': if os.path.split(home)[1]=='.': home=os.path.split(home)[0]
home=os.path.split(home)[0]+d[2:] if os.path.split(home)[1]=='..':
else: home=os.path.split(os.path.split(home)[0])[0]
home=home+d[1:]
else: home=d
else:
home=os.getcwd()
SOFTWARE_HOME=sys.modules['__builtin__'].SOFTWARE_HOME=home SOFTWARE_HOME=sys.modules['__builtin__'].SOFTWARE_HOME=home
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment