From 9c13224353eefbb6b1824ded20846036b07c558f Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 5 May 2013 13:49:20 +1200 Subject: [PATCH] Fix exception hierarchy. --- netlib/tcp.py | 4 ++-- test/test_http.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/netlib/tcp.py b/netlib/tcp.py index 07b28cf9f..b67ad0bb2 100644 --- a/netlib/tcp.py +++ b/netlib/tcp.py @@ -35,8 +35,8 @@ OP_TLS_ROLLBACK_BUG = SSL.OP_TLS_ROLLBACK_BUG class NetLibError(Exception): pass -class NetLibDisconnect(Exception): pass -class NetLibTimeout(Exception): pass +class NetLibDisconnect(NetLibError): pass +class NetLibTimeout(NetLibError): pass class _FileLike: diff --git a/test/test_http.py b/test/test_http.py index 77cc26246..62d0c3dcc 100644 --- a/test/test_http.py +++ b/test/test_http.py @@ -146,7 +146,7 @@ def test_parse_init_connect(): assert not http.parse_init_connect("CONNECT host.com:foo HTTP/1.0") -def test_prase_init_proxy(): +def test_parse_init_proxy(): u = "GET http://foo.com:8888/test HTTP/1.1" m, s, h, po, pa, httpversion = http.parse_init_proxy(u) assert m == "GET"