Commit daac03c8 authored by Jim Fulton's avatar Jim Fulton

Added knob to turn-off instance home products.

parent 755c332a
...@@ -85,9 +85,9 @@ ...@@ -85,9 +85,9 @@
"""Commonly used utility functions.""" """Commonly used utility functions."""
__version__='$Revision: 1.2 $'[11:-2] __version__='$Revision: 1.3 $'[11:-2]
import os, sys, Products import os, sys, Products, string
from Common import package_home from Common import package_home
try: home=os.environ['SOFTWARE_HOME'] try: home=os.environ['SOFTWARE_HOME']
...@@ -118,6 +118,8 @@ sys.modules['__builtin__'].INSTANCE_HOME=INSTANCE_HOME=chome ...@@ -118,6 +118,8 @@ sys.modules['__builtin__'].INSTANCE_HOME=INSTANCE_HOME=chome
ip=os.path.join(INSTANCE_HOME, 'Products') ip=os.path.join(INSTANCE_HOME, 'Products')
if os.path.isdir(ip) and ip not in Products.__path__: if os.path.isdir(ip) and ip not in Products.__path__:
Products.__path__.insert(0, ip) disallow=string.lower(os.environ.get('DISALLOW_LOCAL_PRODUCTS',''))
if disallow in ('no', 'off', '0', ''):
Products.__path__.insert(0, ip)
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