Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

nicer double bind message

  • Loading branch information...
commit c649cd819ee657172298eada468a6a98293b1147 1 parent 932a5bd
Kristina Chodorow authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 httpd.py
View
9 httpd.py
@@ -195,7 +195,14 @@ def serve_forever(port):
print "=================================\n"
if MongoServer.pem == None:
- server = HTTPServer(('', port), MongoHTTPRequest)
+ try:
+ server = HTTPServer(('', port), MongoHTTPRequest)
+ except socket.error, (value, message):
+ if value == 98:
+ print "could not bind to localhost:%d... is sleepy.mongoose already running?\n" % port
+ else:
+ print message
+ return
else:
print "--------Secure Connection--------\n"
server = MongoServer(('', port), MongoHTTPSRequest)
Please sign in to comment.
Something went wrong with that request. Please try again.