Skip to content

Commit

Permalink
fix: Reloader choked on very old namespace modules.
Browse files Browse the repository at this point in the history
Namespace modules created with old versions of setuptools did not conform to spec . Those are still around, unfortunately.

fixes #1455
  • Loading branch information
defnull committed Sep 14, 2024
1 parent 87b2bf1 commit a93eda4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bottle.py
Original file line number Diff line number Diff line change
Expand Up @@ -3997,7 +3997,7 @@ def run(self):
files = dict()

for module in list(sys.modules.values()):
path = getattr(module, '__file__', '')
path = getattr(module, '__file__') or ''
if path[-4:] in ('.pyo', '.pyc'): path = path[:-1]
if path and exists(path): files[path] = mtime(path)

Expand Down

0 comments on commit a93eda4

Please sign in to comment.