From 3249e143a2acfc1686f4ffdcf809f565c5714f0e Mon Sep 17 00:00:00 2001 From: Sfan5 Date: Thu, 25 Apr 2013 16:17:03 +0200 Subject: [PATCH] [RssNotifiy] Fix empty author bug --- rssnotify.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rssnotify.py b/rssnotify.py index 9638a3e..452ee8b 100755 --- a/rssnotify.py +++ b/rssnotify.py @@ -66,6 +66,11 @@ def rsscheck(phenny, input): commiter = feed_entry.authors[0].href.replace('https://github.com/',"") except AttributeError: commiter = commiter_realname # This will only print the Realname if the nickname couldn't be obtained + if commiter_realname == "": + try: + commiter_realname = feed_entry.authors[0].email + except AttributeError: + commiter_realname = "Unknown" reponame = url.replace("https://github.com/","").replace("/commits/master.atom","") commit_hash = feed_entry.links[0].href.replace("https://github.com/" + reponame + "/commit/","")[:10] commit_time = feed_entry.updated