Skip to content

Commit

Permalink
main: better error message for invalid --host
Browse files Browse the repository at this point in the history
  • Loading branch information
back-to committed Dec 29, 2020
1 parent 61ff9a1 commit 1c07357
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion liveproxy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ def main():
if err.errno == errno.EADDRINUSE:
log.error(f'Could not listen on port {PORT}! Exiting...')
sys.exit(errno.EADDRINUSE)
log.error(f'Error {err.errno}! Exiting...')
elif err.errno == errno.EADDRNOTAVAIL:
log.error(f'Cannot assign requested address {HOST}')
sys.exit(err.errno)
log.error(f'Error {err}! Exiting...')
sys.exit(err.errno)
try:
httpd.serve_forever()
Expand Down

0 comments on commit 1c07357

Please sign in to comment.