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:27 +0100 |
commit | c8179b28d93b2875a31866c6b84a9b5b59c0c8b4 (patch) | |
tree | d2ad16a94c6767a009ac1bed2d3c686ba7cc9429 | |
parent | 5813b873a885094759178583f65cc0f0f2bc576b (diff) | |
download | bottle-c8179b28d93b2875a31866c6b84a9b5b59c0c8b4.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.
-rwxr-xr-x | bottle.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3753,7 +3753,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) |