We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b88bfa5 commit b00f70fCopy full SHA for b00f70f
adafruit_httpserver/response.py
@@ -216,6 +216,10 @@ def __init__( # pylint: disable=too-many-arguments
216
)
217
self._filename = filename + "index.html" if filename.endswith("/") else filename
218
self._root_path = root_path or self._request.server.root_path
219
+
220
+ if self._root_path is None:
221
+ raise ValueError("root_path must be provided in Server or in FileResponse")
222
223
self._full_file_path = self._combine_path(self._root_path, self._filename)
224
self._content_type = content_type or MIMETypes.get_for_filename(self._filename)
225
self._file_length = self._get_file_length(self._full_file_path)
0 commit comments