diff options
author | Clemens <cle1000.cb@gmail.com> | 2016-07-19 12:32:36 +0200 |
---|---|---|
committer | Clemens <cle1000.cb@gmail.com> | 2016-07-19 12:32:36 +0200 |
commit | 698fb11132598a38851383f805dde5ca4d2a046d (patch) | |
tree | 95fc0184735722ccd6e4697f884496d6852e13f6 /netlib/utils.py | |
parent | 48728af43ad746d70ef3e251dc28b75028dea1e6 (diff) | |
parent | 18dd84b9081fb5552d5b5b2560405496445e2110 (diff) | |
download | mitmproxy-698fb11132598a38851383f805dde5ca4d2a046d.tar.gz mitmproxy-698fb11132598a38851383f805dde5ca4d2a046d.tar.bz2 mitmproxy-698fb11132598a38851383f805dde5ca4d2a046d.zip |
Merge remote-tracking branch 'origin/master' into flow_editing
Diffstat (limited to 'netlib/utils.py')
-rw-r--r-- | netlib/utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/netlib/utils.py b/netlib/utils.py index 23c16dc3..9eebf22c 100644 --- a/netlib/utils.py +++ b/netlib/utils.py @@ -56,6 +56,13 @@ class Data(object): dirname = os.path.dirname(inspect.getsourcefile(m)) self.dirname = os.path.abspath(dirname) + def push(self, subpath): + """ + Change the data object to a path relative to the module. + """ + self.dirname = os.path.join(self.dirname, subpath) + return self + def path(self, path): """ Returns a path to the package data housed at 'path' under this |