From 3d0c42d0112fcc2026ab4f805b93b4d8b0405718 Mon Sep 17 00:00:00 2001 From: ryanss Date: Sun, 28 Jun 2015 08:16:57 -0400 Subject: Fix exception caused by comment items without content Example [9772426] --- ftplugin/hackernews.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ftplugin/hackernews.py b/ftplugin/hackernews.py index 97205d1..86b16bf 100644 --- a/ftplugin/hackernews.py +++ b/ftplugin/hackernews.py @@ -267,6 +267,10 @@ def print_comments(comments, level=0): bwrite("%sComment by %s %s: [%s]" % (" "*level*4, comment.get('user', '???'), comment['time_ago'], comment['id'])) + if not comment.get('content', False): + bwrite("") + bwrite("") + continue for p in comment['content'].split("
"): if not p: continue -- cgit v1.2.3