From 1e73febc325a288b7ce77e932fb9b340001d2410 Mon Sep 17 00:00:00 2001 From: rambominator Date: Mon, 9 Mar 2015 13:38:48 +0300 Subject: Fix HTTPError message --- ftplugin/hackernews.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ftplugin/hackernews.py') diff --git a/ftplugin/hackernews.py b/ftplugin/hackernews.py index 001c576..a055dba 100644 --- a/ftplugin/hackernews.py +++ b/ftplugin/hackernews.py @@ -80,7 +80,7 @@ def main(): news2 = json.loads(urlopen(API_URL+"/news2", timeout=5) .read().decode('utf-8')) except HTTPError: - print("HackerNews.vim Error: %s" % str(sys.exc_info()[1][0])) + print("HackerNews.vim Error: %s" % str(sys.exc_info()[1].reason)) return except: print("HackerNews.vim Error: HTTP Request Timeout") -- cgit v1.2.3