diff options
author | Ludovic Chabant <ludovic@chabant.com> | 2019-01-22 05:56:28 +0000 |
---|---|---|
committer | Ludovic Chabant <ludovic@chabant.com> | 2019-01-22 05:56:28 +0000 |
commit | b4267b1236a3b4e231e8977b46b6fe8547bb7d68 (patch) | |
tree | f62ac51dfeaf9cfd757cef285be6e77dab560e9c /gitsrht/blueprints/repo.py | |
parent | 391aaec3b817d20a58771fe42281853326a13808 (diff) |
Fix crash when there's no README file
Diffstat (limited to 'gitsrht/blueprints/repo.py')
-rw-r--r-- | gitsrht/blueprints/repo.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py index 701ec5f..4b55a20 100644 --- a/gitsrht/blueprints/repo.py +++ b/gitsrht/blueprints/repo.py @@ -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() |