diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-06-25 23:25:49 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-06-25 23:25:49 +0200 |
commit | c039e4a2e322ee4e0a173f164be598dc630d3579 (patch) | |
tree | 0463ef5a618be362909ebf4111c2438dc86e7f5f /libmproxy | |
parent | 84a016dccf2aed5a949832e57e0e38dd432cdb49 (diff) | |
download | mitmproxy-c039e4a2e322ee4e0a173f164be598dc630d3579.tar.gz mitmproxy-c039e4a2e322ee4e0a173f164be598dc630d3579.tar.bz2 mitmproxy-c039e4a2e322ee4e0a173f164be598dc630d3579.zip |
fix ProxyError inheritance
Diffstat (limited to 'libmproxy')
-rw-r--r-- | libmproxy/proxy/primitives.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libmproxy/proxy/primitives.py b/libmproxy/proxy/primitives.py index 691db922..6154749c 100644 --- a/libmproxy/proxy/primitives.py +++ b/libmproxy/proxy/primitives.py @@ -1,12 +1,10 @@ from __future__ import absolute_import -class ProxyError(Exception): - def __init__(self, code, msg, headers=None): - self.code, self.msg, self.headers = code, msg, headers - - def __str__(self): - return "ProxyError(%s, %s)" % (self.code, self.msg) +class ProxyError(Exception): + def __init__(self, code, message, headers=None): + super(ProxyError, self).__init__(self, message) + self.code, self.headers = code, headers class ConnectionTypeChange(Exception): """ |