<commit_before>#!/usr/bin/env python
from twisted.internet.endpoints import TCP4ServerEndpoint
from twisted.internet import reactor

import editorFactory

if __name__ == "__main__":
    server = editorFactory.EditorFactory()
    TCP4ServerEndpoint(reactor, 4567).listen(server)
    print('Starting up...')
    reactor.run()
<commit_msg>Die if we have an error listening.<commit_after>#!/usr/bin/env python
import sys

from twisted.internet.endpoints import TCP4ServerEndpoint
from twisted.internet import reactor

import editorFactory


def onErr(err):
	print 'AVENGE MEEEEEEEEE!'
	sys.exit(1)


if __name__ == "__main__":
    server = editorFactory.EditorFactory()
    endpoint = TCP4ServerEndpoint(reactor, 4567)
    listener = endpoint.listen(server)
    listener.addErrback(onErr);

    print('Starting up...')
    reactor.run()

{'fraction_non_alphanumeric': 0.1056422569027611, 'fraction_numerical': 0.015606242496998799, 'mean_word_length': 4.673469387755102, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '853736', 'n_tokens_mistral': 268, 'n_tokens_neox': 253, 'n_words': 62}