summaryrefslogtreecommitdiff
path: root/src/werkzeug/utils.py
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2023-04-20 10:37:39 -0700
committerDavid Lord <davidism@gmail.com>2023-04-20 10:49:25 -0700
commit7be1875015f856ec6826f98c13b0edd0d11e8d82 (patch)
tree01fe1089dee2e525cfd8394915209d82dd2c7c89 /src/werkzeug/utils.py
parent9879b4ed6f145f072f6d10d5fde8c17ff0d42cb7 (diff)
downloadwerkzeug-7be1875015f856ec6826f98c13b0edd0d11e8d82.tar.gz
drop support for python 3.7
Diffstat (limited to 'src/werkzeug/utils.py')
-rw-r--r--src/werkzeug/utils.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/werkzeug/utils.py b/src/werkzeug/utils.py
index d0d6bd92..d0841d84 100644
--- a/src/werkzeug/utils.py
+++ b/src/werkzeug/utils.py
@@ -574,12 +574,8 @@ def send_from_directory(
if "_root_path" in kwargs:
path = os.path.join(kwargs["_root_path"], path)
- try:
- if not os.path.isfile(path):
- raise NotFound()
- except ValueError:
- # path contains null byte on Python < 3.8
- raise NotFound() from None
+ if not os.path.isfile(path):
+ raise NotFound()
return send_file(path, environ, **kwargs)