]> jfr.im git - irc/rizon/acid.git/commitdiff
Internets: Don't print description field if it's empty
authorKristina Brooks <redacted>
Mon, 22 Sep 2014 00:12:47 +0000 (01:12 +0100)
committerKristina Brooks <redacted>
Mon, 22 Sep 2014 00:12:47 +0000 (01:12 +0100)
pyva/pyva/src/main/python/internets/cmd_user.py

index 156aafd5ba68ff445b55f4cb8b1921064f8648e4..748ac563f816a8b3481be2649e0f7a78cfdb64a1 100644 (file)
@@ -172,7 +172,9 @@ def command_google_search(self, manager, opts, arg, channel, sender, userinfo):
        self.msg(channel, '[Google] @b%(title)s@b <@u%(url)s@u>' % {
                                        'title': unescape(json['titleNoFormatting']), 
                                        'url': json['unescapedUrl']})
-       self.msg(channel, '[Google] @bDescription@b: %s' % unescape(json['content']).replace('<b>', '@b').replace('</b>', '@b'))
+
+       if json['content'] != '':
+               self.msg(channel, '[Google] @bDescription@b: %s' % unescape(json['content']).replace('<b>', '@b').replace('</b>', '@b'))
 
 def command_calc(self, manager, opts, arg, channel, sender, userinfo):
        try:  # local calculation using PyParsing