diff options
Diffstat (limited to 'paste/deploy/loadwsgi.py')
-rw-r--r-- | paste/deploy/loadwsgi.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/paste/deploy/loadwsgi.py b/paste/deploy/loadwsgi.py index 3bb820f..29e880d 100644 --- a/paste/deploy/loadwsgi.py +++ b/paste/deploy/loadwsgi.py @@ -324,6 +324,11 @@ class ConfigLoader(_Loader): # Stupid ConfigParser ignores files that aren't found, so # we have to add an extra check: if not os.path.exists(filename): + if filename.strip() != filename: + raise OSError( + "File %r not found; trailing whitespace: " + "did you try to use a # on the same line as a filename? " + "(comments must be on their own line)" % filename) raise OSError( "File %r not found" % filename) self.parser.read(filename) |