fix bug when #client not exist
authorOrakaro <nhatminh_179@hotmail.com>
Wed, 24 Sep 2014 17:34:49 +0000 (02:34 +0900)
committerOrakaro <nhatminh_179@hotmail.com>
Wed, 24 Sep 2014 17:34:49 +0000 (02:34 +0900)
docs/conf.py
rainbowstream/draw.py
setup.py

index c0cbe38..481a919 100644 (file)
@@ -48,9 +48,9 @@ copyright = u'2014, Vu Nhat Minh'
 # built documents.
 #
 # The short X.Y version.
-version = '1.0.8'
+version = '1.0.9'
 # The full version, including alpha/beta/rc tags.
-release = '1.0.8'
+release = '1.0.9'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
index dd32297..a947506 100644 (file)
@@ -328,6 +328,7 @@ def draw(t, keyword=None, humanize=True, noti=False, fil=[], ig=[]):
         formater = nick.join(formater.split('#nick'))
         formater = fav.join(formater.split('#fav'))
         formater = tweet.join(formater.split('#tweet'))
+        formater = emojize(formater)
         # Change clock word
         word = [wo for wo in formater.split() if '#clock' in wo][0]
         delimiter = color_func(c['TWEET']['clock'])(
@@ -337,11 +338,6 @@ def draw(t, keyword=None, humanize=True, noti=False, fil=[], ig=[]):
         word = [wo for wo in formater.split() if '#id' in wo][0]
         delimiter = color_func(c['TWEET']['id'])(id.join(word.split('#id')))
         formater = delimiter.join(formater.split(word))
-        # Change client word
-        word = [wo for wo in formater.split() if '#client' in wo][0]
-        delimiter = color_func(c['TWEET']['client'])(
-            client.join(word.split('#client')))
-        formater = delimiter.join(formater.split(word))
         # Change retweet count word
         word = [wo for wo in formater.split() if '#rt_count' in wo][0]
         delimiter = color_func(c['TWEET']['retweet_count'])(
@@ -352,7 +348,11 @@ def draw(t, keyword=None, humanize=True, noti=False, fil=[], ig=[]):
         delimiter = color_func(c['TWEET']['favorite_count'])(
             str(favorite_count).join(word.split('#fa_count')))
         formater = delimiter.join(formater.split(word))
-        formater = emojize(formater)
+        # Change client word
+        word = [wo for wo in formater.split() if '#client' in wo][0]
+        delimiter = color_func(c['TWEET']['client'])(
+            client.join(word.split('#client')))
+        formater = delimiter.join(formater.split(word))
     except:
         pass
 
index 82eed6e..4cb4e69 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ import os
 import os.path
 
 # Bumped version
-version = '1.0.8'
+version = '1.0.9'
 
 # Require
 install_requires = [