From cf55ee8b4a29471a17716e09b0ba8399aceb4276 Mon Sep 17 00:00:00 2001 From: Chris Streeter Date: Mon, 28 Oct 2013 22:00:53 -0700 Subject: [PATCH] Fix WSGIServerException ImportError References jezdez/django-staticfiles#40 --- staticfiles/management/commands/runserver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/staticfiles/management/commands/runserver.py b/staticfiles/management/commands/runserver.py index 6c78f7e..ca4baae 100644 --- a/staticfiles/management/commands/runserver.py +++ b/staticfiles/management/commands/runserver.py @@ -5,7 +5,7 @@ from django.conf import settings from django.core.handlers.wsgi import WSGIHandler -from django.core.servers.basehttp import run, WSGIServerException +from django.core.servers.basehttp import run from django.core.management.base import BaseCommand, CommandError from staticfiles.handlers import StaticFilesHandler @@ -97,7 +97,7 @@ def inner_run(): try: handler = self.get_handler(*args, **options) run(addr, int(port), handler) - except WSGIServerException, e: + except Exception, e: # Use helpful error messages instead of ugly tracebacks. ERRORS = { 13: "You don't have permission to access that port.",