From 5650e1dfd84c45eecf4d6a926c927e765f6a7f71 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Sun, 21 Jun 2015 14:39:26 +0200 Subject: Skip website if empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- fingerchange.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fingerchange.py b/fingerchange.py index a908398..30936ad 100644 --- a/fingerchange.py +++ b/fingerchange.py @@ -84,9 +84,11 @@ def format_user(user, long_output=True): msg += format_field('reputation', user['reputation']) if 'location' in user: msg += format_field('location', user['location']) + msg += format_field('profile', format_url(user['link'])) - if 'website_url' in user: + if 'website_url' in user and len(user['website_url']) > 0: msg += format_field('website', format_url(user['website_url'])) + msg += format_rep_changes(user) msg += '\n' -- cgit v1.2.3-54-g00ecf