<commit_before>from BaseHTTPServer import HTTPServer
from HTTPHandler import HTTPHandler
from Cron import Cron
from Settings import PORT
from Update import check

check()

server = HTTPServer(('', PORT), HTTPHandler)
Cron.start()
try:
	server.serve_forever()
except KeyboardInterrupt:
	pass
server.server_close()<commit_msg>Sane socket errors<commit_after>from BaseHTTPServer import HTTPServer
from HTTPHandler import HTTPHandler
import socket

from Cron import Cron
from Settings import PORT
from Update import check

check()

try:
	server = HTTPServer(('', PORT), HTTPHandler)
except socket.error, (errno, msg):
	print "Unable to open port %d: %s" % (PORT, msg)
	exit(1)

Cron.start()

try:
	server.serve_forever()
except KeyboardInterrupt:
	pass
server.server_close()
{'fraction_non_alphanumeric': 0.08831168831168831, 'fraction_numerical': 0.0012987012987012987, 'mean_word_length': 6.273584905660377, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2023461', 'n_tokens_mistral': 235, 'n_tokens_neox': 234, 'n_words': 82}