diff options
author | Marcel Hellkamp <marc@gsites.de> | 2018-12-13 08:26:27 +0100 |
---|---|---|
committer | Marcel Hellkamp <marc@gsites.de> | 2018-12-13 08:26:49 +0100 |
commit | 076f41759ceacb1a804517270392f0ef75adb07f (patch) | |
tree | 0a7e2dec7755195f9a5de5c4e0471d22a2625999 | |
parent | 8dd6e6433ba9f0a1404a08058f08f070b66dda24 (diff) | |
download | bottle-076f41759ceacb1a804517270392f0ef75adb07f.tar.gz |
fix #1115: Some modules set __file__ as None
This is not allowed (the __file__ attribute MUST be either a string, or unset),
but seems to happen anyway and is easy to work around in bottle.
-rw-r--r-- | bottle.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3156,7 +3156,7 @@ class FileCheckerThread(threading.Thread): 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) |