appengine-pipelines icon indicating copy to clipboard operation
appengine-pipelines copied to clipboard

_fix_path prevents module from importing if PYTHONPATH is not set

Open georgewhewell opened this issue 9 years ago • 0 comments

If PYTHONPATH is not set, AttributeError is thrown:

  File "snip", line 8, in <module>
    from pipeline import pipeline
  File "/Users/grw/src/cms/env/lib/python2.7/site-packages/pipeline/__init__.py", line 47, in <module>
    _fix_path()
  File "/Users/grw/src/cms/env/lib/python2.7/site-packages/pipeline/__init__.py", line 26, in _fix_path
    all_paths = os.environ.get('PYTHONPATH').split(os.pathsep)
AttributeError: 'NoneType' object has no attribute 'split'

georgewhewell avatar Dec 08 '16 13:12 georgewhewell