Permalink
Browse files

Minor housekeeping - unused code, nocover directives.

95% test coverage.
  • Loading branch information...
1 parent 79039eb commit 57f96c5fe014420a09ed42e96f67562fabe33048 @cortesi committed Feb 24, 2011
Showing with 3 additions and 27 deletions.
  1. +3 −1 libmproxy/flow.py
  2. +0 −10 libmproxy/utils.py
  3. +0 −13 mitmproxy
  4. +0 −3 test/test_utils.py
View
@@ -390,7 +390,9 @@ def __init__(self, server, state):
self.stickycookie_state = False
def _runscript(self, f, script):
- return f.run_script(script)
+ #begin nocover
+ raise NotImplementedError
+ #end nocover
def set_response_script(self, s):
self.scripts["response"] = s
View
@@ -434,13 +434,3 @@ def dummy_cert(certdir, ca, commonname):
)
if ret: return None
return certpath
-
-
-def mkdir_p(path):
- try:
- os.makedirs(path)
- except OSError as exc:
- if exc.errno == errno.EEXIST:
- pass
- else:
- raise
View
@@ -71,11 +71,6 @@ if __name__ == '__main__':
"Recorder",
"Options controlling recorder behavior"
)
- group.add_option(
- "-w", "--store", action="store",
- type = "str", dest="cache", default=None,
- help = "Session store location"
- )
group.add_option(
"-C", "--cookies", action="append",
type = "str", dest="cookies", default=[],
@@ -86,14 +81,6 @@ if __name__ == '__main__':
options, args = parser.parse_args()
- if options.cache is not None:
- options.cache = os.path.expanduser(options.cache)
- if options.cache is not None:
- 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)
-
config = proxy.process_certificate_option_group(parser, options)
server = proxy.ProxyServer(config, options.port, options.addr)
m = console.ConsoleMaster(server, options)
View
@@ -310,10 +310,7 @@ def test_no_ca(self):
assert os.path.exists(os.path.join(d, "foo.com.pem"))
-
-
-
tests = [
uformat_timestamp(),
uisBin(),

0 comments on commit 57f96c5

Please sign in to comment.