def get_template_sources(template_name, template_dirs=None):
    if not hasattr(gsettings.threadlocal, "theme"): 
        print "get_template_sources no threadlocal"
        return
    theme = gsettings.threadlocal.theme + "/"
    if not template_dirs:
        template_dirs = settings.TEMPLATE_DIRS
    for template_dir in template_dirs:
        try:
            yield safe_join(template_dir, theme + template_name)
        except __HOLE__:
            # The joined path was located outside of template_dir.
            pass
# }}}

# load_template_source # {{{
dataset/ETHPy150Open amitu/gitology/src/gitology/d/themed_template_loader.py/get_template_sources