diff options
author | Gabriel Falcão <gabriel@nacaolivre.org> | 2020-03-26 00:33:20 +0100 |
---|---|---|
committer | Gabriel Falcão <gabriel@nacaolivre.org> | 2020-03-26 00:33:20 +0100 |
commit | 5517854c721f18ba2121ee893ef36f54d89b0ec4 (patch) | |
tree | ca7578c429cbe6d99f3c4b21dc86c2156fd5906d | |
parent | 1599ba6dda16508af996d0ea330a0d4995e6bf7f (diff) | |
download | httpretty-5517854c721f18ba2121ee893ef36f54d89b0ec4.tar.gz |
fix some bento checks
-rw-r--r-- | .bento/config.yml | 2 | ||||
-rw-r--r-- | httpretty/core.py | 2 | ||||
-rw-r--r-- | tests/functional/test_bypass.py | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/.bento/config.yml b/.bento/config.yml index 30b423b..86aa408 100644 --- a/.bento/config.yml +++ b/.bento/config.yml @@ -5,6 +5,7 @@ formatter: tools: bandit: ignore: + - exec-used - any-other-function-with-shell-equals-true - assert-used - hardcoded-bind-all-interfaces @@ -34,6 +35,7 @@ tools: run: true flake8: ignore: + - unreliable-hasattr-call - bad-wildcard-import - bare-except-bugbear - no-getattr diff --git a/httpretty/core.py b/httpretty/core.py index a8dde8e..8313354 100644 --- a/httpretty/core.py +++ b/httpretty/core.py @@ -289,7 +289,7 @@ class HTTPrettyRequest(BaseHTTPRequestHandler, BaseClass): try: body = decode_utf8(body) return do_parse(body) - except (Exception, BaseException): + except Exception: return body diff --git a/tests/functional/test_bypass.py b/tests/functional/test_bypass.py index 9477ad8..97dec3d 100644 --- a/tests/functional/test_bypass.py +++ b/tests/functional/test_bypass.py @@ -60,7 +60,7 @@ def start_http_server(context): try: requests.get('http://localhost:{}/'.format(context.http_port)) ready = True - except (Exception, BaseException): + except Exception: if time.time() - started_at >= timeout: break |