diff options
author | Aldo Cortesi <aldo@corte.si> | 2016-07-15 16:48:01 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-15 16:48:01 +1200 |
commit | 64e16f5112669a31f86183be640eeee3a47c2961 (patch) | |
tree | 2e8ecc38f022c2b302d5ce67fd282dab45941fd9 /netlib/utils.py | |
parent | e051928f26afbc58c01d7854b62f8bfb0d4ed5ee (diff) | |
parent | c7d0850d8f697915b183f4fafd5ede7df2245569 (diff) | |
download | mitmproxy-64e16f5112669a31f86183be640eeee3a47c2961.tar.gz mitmproxy-64e16f5112669a31f86183be640eeee3a47c2961.tar.bz2 mitmproxy-64e16f5112669a31f86183be640eeee3a47c2961.zip |
Merge pull request #1356 from cortesi/script
Scripts to addon
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 |