From aa161945180cdd078317e8679eaffe383b72304b Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 20 Feb 2011 14:03:32 +1300 Subject: Clean up and strip down netstrings module. --- libmproxy/utils.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'libmproxy/utils.py') 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 - - -- cgit v1.2.3