Repository navigation
Handle web UI port startup errors - #70
Conversation
blixvip
left a comment
There was a problem hiding this comment.
Thanks @Kareenashinde15! This covers both halves of #47: the busy port and the import-time ValueError. The tests are nicely targeted. 83 tests pass here, and with a real socket holding the port, main() now exits cleanly instead of printing a traceback.
One small fix: the two string pieces in the busy-port message are joined without a space, so the user sees this:
cannot start easyedit web UI on port 4339: [Errno 98] Address already in use. Choose another port by setting EASYEDIT_PORT.PowerShell: $env:EASYEDIT_PORT='4332'
Adding a space (and making the example easier to read) fixes it:
- "Choose another port by setting EASYEDIT_PORT."
- "PowerShell: $env:EASYEDIT_PORT='4332'"
+ "Choose another port by setting EASYEDIT_PORT "
+ "(PowerShell: $env:EASYEDIT_PORT='4332')."Optional nit: put two blank lines after get_port(), before WEB = ..., to match the rest of the module. Push the fix and I'll merge.
|
Thanks for the review! |
|
Verified locally: the suite goes from 78 to 83 tests and all five new ones pass. The two pre-existing failures ( Checked that no stale Thanks @Kareenashinde15 — and thanks for turning #69 around so quickly after the review. Merging. |
Summary
EASYEDIT_PORTenvironment variable.Testing
Fixes #47