<commit_before>import fedmsg
from fedmsg.commands import command

extra_args = [
    (['--websocket-server-port'], {
        'dest': 'moksha.livesocket.websocket.port',
        'type': int,
        'help': 'Port on which to host the websocket server.',
        'default': None,
    }),
]


@command(extra_args=extra_args)
def hub(**kw):
    """ Run the fedmsg hub. """

    # Check if the user wants the websocket server to run
    if 'moksha.livesocket.websocket.port' in kw:
        kw['moksha.livesocket.backend'] = 'websocket'<commit_msg>Better check for whether or not to run the websocket server.<commit_after>import fedmsg
from fedmsg.commands import command

extra_args = [
    (['--websocket-server-port'], {
        'dest': 'moksha.livesocket.websocket.port',
        'type': int,
        'help': 'Port on which to host the websocket server.',
        'default': None,
    }),
]


@command(extra_args=extra_args)
def hub(**kw):
    """ Run the fedmsg hub. """

    # Check if the user wants the websocket server to run
    if kw['moksha.livesocket.websocket.port']:
        kw['moksha.livesocket.backend'] = 'websocket'
{'fraction_non_alphanumeric': 0.13906111603188662, 'fraction_numerical': 0.0, 'mean_word_length': 3.0942028985507246, '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': '1512696', 'n_tokens_mistral': 376, 'n_tokens_neox': 360, 'n_words': 99}