dcramer / django-devserver

A drop-in replacement for Django's runserver.
BSD 3-Clause "New" or "Revised" License
1.27k stars 159 forks source link

NameError thrown when two devservers running on the same port #46

Closed dlo closed 13 years ago

dlo commented 13 years ago

This case needs a sane error message. If I'm running on ./manage.py runserver 0.0.0.0:80 on one app, and try to run the same command in another terminal, I get the following traceback.

Validating models...
0 errors found

Django version 1.3, using settings 'app.settings'
Running django-devserver 0.2.0
Threaded server is running at http://0.0.0.0:80/
Quit the server with CONTROL-C.
Unhandled exception in thread started by <function inner_run at 0x101757c80>
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/devserver/management/commands/runserver.py", line 136, in inner_run
    error_text = ERRORS[e.args[0].args[0]]
NameError: free variable 'e' referenced before assignment in enclosing scope
dcramer commented 13 years ago

Can you confirm this still exists on the latest master. Thought I fixed that :0

dlo commented 13 years ago

Ah, you already fixed it--sorry about that!