From 2ff517ccb6116c1be6338e6bdcf08a313defc5c7 Mon Sep 17 00:00:00 2001 From: Tom Forbes Date: Sun, 21 Jul 2019 21:55:25 +0100 Subject: Fixed #30506 -- Fixed crash of autoreloader when path contains null characters. --- django/utils/autoreload.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'django/utils') diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py index 25c3b44250..bf3b14609a 100644 --- a/django/utils/autoreload.py +++ b/django/utils/autoreload.py @@ -143,6 +143,10 @@ def iter_modules_and_files(modules, extra_files): # The module could have been removed, don't fail loudly if this # is the case. continue + except ValueError as e: + # Network filesystems may return null bytes in file paths. + logger.debug('"%s" raised when resolving path: "%s"' % (str(e), path)) + continue results.add(resolved_path) return frozenset(results) -- cgit v1.3