diff options
author | Henrik Nordstrom <henrik@henriknordstrom.net> | 2011-01-11 18:04:15 +0100 |
---|---|---|
committer | Henrik Nordstrom <henrik@henriknordstrom.net> | 2011-02-10 02:59:51 +0100 |
commit | 061cea89da96bc2ee71d9d2f065ae920aeccb311 (patch) | |
tree | 35a0b0f81013c6fc2beba71cfdcc24fd342f8c24 /mitmrecord | |
parent | d11dd742d8593087959b6f1e0d9cc1f956dee03e (diff) | |
download | mitmproxy-061cea89da96bc2ee71d9d2f065ae920aeccb311.tar.gz mitmproxy-061cea89da96bc2ee71d9d2f065ae920aeccb311.tar.bz2 mitmproxy-061cea89da96bc2ee71d9d2f065ae920aeccb311.zip |
Import cache store control into console controller
Diffstat (limited to 'mitmrecord')
-rwxr-xr-x | mitmrecord | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -18,20 +18,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -import sys, os.path, os, errno +import sys, os.path from libmproxy import proxy, controller, record, utils from libmproxy import VERSION from optparse import OptionParser, OptionGroup -def mkdir_p(path): - try: - os.makedirs(path) - except OSError as exc: - if exc.errno == errno.EEXIST: - pass - else: - raise - if __name__ == '__main__': parser = OptionParser( usage = "%prog [options] output", @@ -85,7 +76,7 @@ if __name__ == '__main__': certpath ) server = proxy.ProxyServer(options.port) - mkdir_p(options.cache) + utils.mkdir_p(options.cache) if os.path.exists(options.cache + "/index.txt"): print >> sys.stderr, "ERROR: data already recorded in %s"%options.cache sys.exit(1) |