~edwargix/git.sr.ht

b4267b1236a3b4e231e8977b46b6fe8547bb7d68 — Ludovic Chabant 7 years ago 391aaec
Fix crash when there's no README file
1 files changed, 2 insertions(+), 2 deletions(-)

M gitsrht/blueprints/repo.py
M gitsrht/blueprints/repo.py => gitsrht/blueprints/repo.py +2 -2
@@ 45,11 45,11 @@ def get_readme(repo, tip):
        try:
            blob = tip.tree[name]
        except KeyError:
            return None
            return None, None

        if blob and blob.type == "blob":
            return blob.id.hex, blob
        return None
        return None, None

    def content_getter(blob):
        return repo.get(blob.id).data.decode()