'This pulls out some git info like the last commit'

def git_info_for_course(self, cdir):

    cmd = ''
    gdir = (settings.DATA_DIR / cdir)
    info = ['', '', '']
    if (not gdir.exists()):
        git_repo_dir = getattr(settings, 'GIT_REPO_DIR', git_import.DEFAULT_GIT_REPO_DIR)
        gdir = (path(git_repo_dir) / cdir)
        if (not gdir.exists()):
            return info
    cmd = ['git', 'log', '-1', '--format=format:{    "commit":    "%H",    "author":    "%an    %ae",    "date":    "%ad"}']
    try:
        output_json = json.loads(subprocess.check_output(cmd, cwd=gdir))
        info = [output_json['commit'], output_json['date'], output_json['author']]
    except (ValueError, subprocess.CalledProcessError):
        pass
    return info
