diff options
| author | ryanss | 2015-06-28 08:16:57 -0400 |
|---|---|---|
| committer | ryanss | 2015-06-28 08:16:57 -0400 |
| commit | 3d0c42d0112fcc2026ab4f805b93b4d8b0405718 (patch) | |
| tree | 657746bc412fa73b53aa78f6021abc8294f72deb /ftplugin/hackernews.py | |
| parent | a78e2f32181fc7a0c24ebf12f939c2fd9b6a5770 (diff) | |
| download | vim-hn-3d0c42d0112fcc2026ab4f805b93b4d8b0405718.tar.gz | |
Fix exception caused by comment items without content
Example [9772426]
Diffstat (limited to 'ftplugin/hackernews.py')
| -rw-r--r-- | ftplugin/hackernews.py | 4 |
1 files changed, 4 insertions, 0 deletions
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("<p>"): if not p: continue |
