diff --git a/pagure/ui/repo.py b/pagure/ui/repo.py index d287b21..3695b27 100644 --- a/pagure/ui/repo.py +++ b/pagure/ui/repo.py @@ -820,7 +820,7 @@ def view_tree(repo, identifier=None, username=None): if isinstance(commit, pygit2.Tag): commit = commit.get_object() - if commit: + if commit and not isinstance(commit, pygit2.Blob): content = sorted(commit.tree, key=lambda x: x.filemode) for i in commit.tree: name, ext = os.path.splitext(i.name)