aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/utils.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2011-02-20 14:03:32 +1300
committerAldo Cortesi <aldo@nullcube.com>2011-02-20 14:03:32 +1300
commitaa161945180cdd078317e8679eaffe383b72304b (patch)
treeaad9e80f8eca0b54584d6daef00be7fcf6b19f14 /libmproxy/utils.py
parent7ddba22f515aa8997da0b5ee36c8ebc9961493dd (diff)
downloadmitmproxy-aa161945180cdd078317e8679eaffe383b72304b.tar.gz
mitmproxy-aa161945180cdd078317e8679eaffe383b72304b.tar.bz2
mitmproxy-aa161945180cdd078317e8679eaffe383b72304b.zip
Clean up and strip down netstrings module.
Diffstat (limited to 'libmproxy/utils.py')
-rw-r--r--libmproxy/utils.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/libmproxy/utils.py b/libmproxy/utils.py
index ab861c55..afef8e63 100644
--- a/libmproxy/utils.py
+++ b/libmproxy/utils.py
@@ -342,8 +342,10 @@ def dummy_ca(path):
stdout=subprocess.PIPE,
stdin=subprocess.PIPE
)
+ # begin nocover
if ret:
return False
+ # end nocover
else:
return True
@@ -382,8 +384,7 @@ def dummy_cert(certdir, ca, commonname):
stdout=subprocess.PIPE,
stdin=subprocess.PIPE
)
- if ret:
- return None
+ if ret: return None
cmd = [
"openssl",
"x509",
@@ -402,8 +403,7 @@ def dummy_cert(certdir, ca, commonname):
stdout=subprocess.PIPE,
stdin=subprocess.PIPE
)
- if ret:
- return None
+ if ret: return None
else:
# Create a new selfsigned certificate + key
cmd = [
@@ -424,8 +424,7 @@ def dummy_cert(certdir, ca, commonname):
stdout=subprocess.PIPE,
stdin=subprocess.PIPE
)
- if ret:
- return None
+ if ret: return None
return certpath
@@ -437,5 +436,3 @@ def mkdir_p(path):
pass
else:
raise
-
-