From 061cea89da96bc2ee71d9d2f065ae920aeccb311 Mon Sep 17 00:00:00 2001 From: Henrik Nordstrom Date: Tue, 11 Jan 2011 18:04:15 +0100 Subject: Import cache store control into console controller --- libmproxy/utils.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'libmproxy/utils.py') diff --git a/libmproxy/utils.py b/libmproxy/utils.py index 42e4d28c..87fca5ce 100644 --- a/libmproxy/utils.py +++ b/libmproxy/utils.py @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import re, os, subprocess, datetime, textwrap +import re, os, subprocess, datetime, textwrap, errno def format_timestamp(s): @@ -341,3 +341,12 @@ def make_bogus_cert(path): stdin=subprocess.PIPE ) +def mkdir_p(path): + try: + os.makedirs(path) + except OSError as exc: + if exc.errno == errno.EEXIST: + pass + else: + raise + -- cgit v1.2.3