aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/optmanager.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2017-04-27 11:09:40 +1200
committerAldo Cortesi <aldo@corte.si>2017-04-27 11:09:40 +1200
commit169baabcab33c1bd1ab7e33907794c7103f962d8 (patch)
tree60358042f65fc1553c839569823e8d17382f3219 /mitmproxy/optmanager.py
parent2a46f3851a468263b53298b643f92a36b713128e (diff)
downloadmitmproxy-169baabcab33c1bd1ab7e33907794c7103f962d8.tar.gz
mitmproxy-169baabcab33c1bd1ab7e33907794c7103f962d8.tar.bz2
mitmproxy-169baabcab33c1bd1ab7e33907794c7103f962d8.zip
Basic outline of the command subsystem
- Add a command manager - Sketch out the type system with a few simple supported types
Diffstat (limited to 'mitmproxy/optmanager.py')
-rw-r--r--mitmproxy/optmanager.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mitmproxy/optmanager.py b/mitmproxy/optmanager.py
index 8369a36e..cf6e21b0 100644
--- a/mitmproxy/optmanager.py
+++ b/mitmproxy/optmanager.py
@@ -31,7 +31,7 @@ class _Option:
help: str,
choices: typing.Optional[typing.Sequence[str]]
) -> None:
- typecheck.check_type(name, default, typespec)
+ typecheck.check_option_type(name, default, typespec)
self.name = name
self.typespec = typespec
self._default = default
@@ -54,7 +54,7 @@ class _Option:
return copy.deepcopy(v)
def set(self, value: typing.Any) -> None:
- typecheck.check_type(self.name, value, self.typespec)
+ typecheck.check_option_type(self.name, value, self.typespec)
self.value = value
def reset(self) -> None: