Skip to content

Commit

Permalink
Update _reloader.py
Browse files Browse the repository at this point in the history
root={}
path=()
os.path.join(*path)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: join() missing 1 required positional argument: 'path'
  • Loading branch information
momotarogrp authored and davidism committed May 4, 2024
1 parent 3c45bc1 commit e633b30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -5,6 +5,8 @@ Version 3.0.3

Unreleased

- Make reloader more robust when ``""`` is in ``sys.path``. :pr:`2823`


Version 3.0.2
-------------
Expand Down
4 changes: 3 additions & 1 deletion src/werkzeug/_reloader.py
Expand Up @@ -157,7 +157,9 @@ def _walk(node: t.Mapping[str, dict[str, t.Any]], path: tuple[str, ...]) -> None
for prefix, child in node.items():
_walk(child, path + (prefix,))

if not node:
# If there are no more nodes, and a path has been accumulated, add it.
# Path may be empty if the "" entry is in sys.path.
if not node and path:
rv.add(os.path.join(*path))

_walk(root, ())
Expand Down

0 comments on commit e633b30

Please sign in to comment.