diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2014-12-28 23:16:50 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2014-12-28 23:16:50 +1300 |
commit | 84f57a283287e7358eed7f8e36fbe0a0652a8675 (patch) | |
tree | f77fca3b0c44ec0809f2d15d06adf0ab2332a77d /doc-src/index.py | |
parent | 7f5965225d6584875a0b520f3cc811d57952e17f (diff) | |
download | mitmproxy-84f57a283287e7358eed7f8e36fbe0a0652a8675.tar.gz mitmproxy-84f57a283287e7358eed7f8e36fbe0a0652a8675.tar.bz2 mitmproxy-84f57a283287e7358eed7f8e36fbe0a0652a8675.zip |
Adjust how doc rendering uses mitmproxy source location
We now make sure our imports come from here too, and that we have mod cons like
tilde expansion in the env variable.
Diffstat (limited to 'doc-src/index.py')
-rw-r--r-- | doc-src/index.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc-src/index.py b/doc-src/index.py index f3d3ed3b..753f90a5 100644 --- a/doc-src/index.py +++ b/doc-src/index.py @@ -4,10 +4,13 @@ import datetime import countershape from countershape import Page, Directory, markup, model import countershape.template -sys.path.insert(0, "..") + +MITMPROXY_SRC = os.path.abspath( + os.path.expanduser(os.environ.get("MITMPROXY_SRC", "..")) +) +sys.path.insert(0, MITMPROXY_SRC) from libmproxy import filt, version -MITMPROXY_SRC = os.environ.get("MITMPROXY_SRC", os.path.abspath("..")) ns.VERSION = version.VERSION if ns.options.website: |