-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Remove stack trace for socket errors with mkdocs serve #596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I meant port 8000, not 8080. |
Ha, I often do this too. Or i have another tool running on 8000 and forget. I think we should catch it and just output an error message. |
@samhatfield why not create a pull request with your proposed change? That seems like the most sensible fix to me. |
I think @samhatfield is learning GitHub, but yeah, go ahead and open a pull request :) It is best to propose changes with pull requests so we can easily review/merge. Another addition to the release notes would be great too! |
Sorry if my tone was off. I noticed that @samhatfield had asked for feedback on his proposed change. However he hadn't received any feedback specifically about that (at least by my reading) -- only that the general request was reasonable. I was trying to tell him that I thought his proposed change looked good and he should submit a PR. Of course, final approval comes from @d0ugal so I did not give any definitive statements regarding whether such a PR would be accepted. |
Not at all :) it was useful, I actually missed the link to the commit when I read it too quickly. So glad you mentioned it, I thought it was just a very reasonable suggestion. |
I was just about to submit a PR earlier, but then I saw that |
Well, for Python < 3.3 we would still need to catch the Although, an argument could be made to catch all errors on the command line (except when in debug mode) and only output the message. However, I expect that would be a more complex issue that should be implemented across the entire CLI. |
Sure thing, #600 submitted. |
Merged. Thanks! |
I often forget I already have a server running on localhost:8080, and whenever I run
mkdocs serve
I get a huge stack trace with a '[Errno 98] Address already in use' at the end. I think we should just catch socket errors and spit out the error message, like forConfigurationError
. Here's what you could do. Should we catch all socket errors though? Or just keep 98 and re-throw the rest?The text was updated successfully, but these errors were encountered: