Commit 4104aa38 authored by Jason R. Coombs's avatar Jason R. Coombs

Delint site-patch

parent 191f5a01
def __boot(): def __boot():
import sys, os, os.path import sys
import os
PYTHONPATH = os.environ.get('PYTHONPATH') PYTHONPATH = os.environ.get('PYTHONPATH')
if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH): if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH):
PYTHONPATH = [] PYTHONPATH = []
...@@ -49,13 +50,13 @@ def __boot(): ...@@ -49,13 +50,13 @@ def __boot():
addsitedir(item) addsitedir(item)
sys.__egginsert += oldpos # restore effective old position sys.__egginsert += oldpos # restore effective old position
d,nd = makepath(stdpath[0]) d, nd = makepath(stdpath[0])
insert_at = None insert_at = None
new_path = [] new_path = []
for item in sys.path: for item in sys.path:
p,np = makepath(item) p, np = makepath(item)
if np==nd and insert_at is None: if np==nd and insert_at is None:
# We've hit the first 'system' path entry, so added entries go here # We've hit the first 'system' path entry, so added entries go here
...@@ -67,17 +68,9 @@ def __boot(): ...@@ -67,17 +68,9 @@ def __boot():
# new path after the insert point, back-insert it # new path after the insert point, back-insert it
new_path.insert(insert_at, item) new_path.insert(insert_at, item)
insert_at += 1 insert_at += 1
sys.path[:] = new_path sys.path[:] = new_path
if __name__=='site': if __name__=='site':
__boot() __boot()
del __boot del __boot
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