From 70169ca2cdc0b306edf87122c00c8a737dc61507 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 2 Jan 2020 13:04:43 -0500 Subject: [PATCH] Fix readme resolution --- gitsrht/blueprints/repo.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py index 382b171..1c212b0 100644 --- a/gitsrht/blueprints/repo.py +++ b/gitsrht/blueprints/repo.py @@ -38,8 +38,11 @@ def get_readme(repo, tip, link_prefix=None): except KeyError: return None, None - if blob and blob.type == "blob": - return blob.id.hex, blob + if blob: + btype = (blob.type_str + if hasattr(blob, "type_str") else blob.type) + if btype == "blob": + return blob.id.hex, blob return None, None def content_getter(blob): -- 2.38.4