<commit_before>from django import template
from django.core.urlresolvers import reverse

register = template.Library()

@register.inclusion_tag('timeline_template.html', takes_context=True)
def timeline(context, src=None, **config):
    try:
        if src is None:
            src = context['timeline'].pk
        if isinstance(src, int):
            config['src'] = '%s?format=json' % reverse('timelineview', kwargs={'pk':src})
        elif src.isdigit():
            print 'its a digit ', src
            config['src'] = '%s?format=json' % reverse('timelineview', kwargs={'pk':src})
        else:
            config['src'] = src
        if context.has_key('options'):
            options = context['options']
            options.__dict__.update(config)
        else: 
            options = config
        return {'context': context, 'config': options}
    except Exception, e:
        raise e<commit_msg>No need to catch an exception if it's only going to be raised again<commit_after>from django import template
from django.core.urlresolvers import reverse

register = template.Library()

@register.inclusion_tag('timeline_template.html', takes_context=True)
def timeline(context, src=None, **config):
    if src is None:
        src = context['timeline'].pk
    if isinstance(src, int):
        config['src'] = '%s?format=json' % reverse('timelineview', kwargs={'pk':src})
    elif src.isdigit():
        print 'its a digit ', src
        config['src'] = '%s?format=json' % reverse('timelineview', kwargs={'pk':src})
    else:
        config['src'] = src
    if context.has_key('options'):
        options = context['options']
        options.__dict__.update(config)
    else:
        options = config
    return {'context': context, 'config': options}
{'fraction_non_alphanumeric': 0.13887307911212293, 'fraction_numerical': 0.0, 'mean_word_length': 3.0413793103448277, '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': '5307167', 'n_tokens_mistral': 492, 'n_tokens_neox': 495, 'n_words': 130}