diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-11-30 14:39:08 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-11-30 14:39:08 -0500 |
commit | ee3bcdc1ed11ae653b4992d35b01d1cce08c990f (patch) | |
tree | 182fe8062bf7c834d212f18237430ee641e9e6ec /gitsrht | |
parent | faad89178f03e35d3f47564cbff020d61d0f0c97 (diff) |
Handle non-UTF-8 READMEs
Diffstat (limited to 'gitsrht')
-rw-r--r-- | gitsrht/blueprints/repo.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py index d4df252..685eaab 100644 --- a/gitsrht/blueprints/repo.py +++ b/gitsrht/blueprints/repo.py @@ -49,7 +49,7 @@ def get_readme(repo, tip): try: md = repo.get(readme.id).data.decode() except: - pass + md = "Error decoding readme - is it valid UTF-8?" html = markdown(md, ["h1", "h2", "h3", "h4", "h5"]) redis.setex(key, html, timedelta(days=7)) return Markup(html) |