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 c0cbe384eab81f348149e720783499f84fa26bfc..481a9190bd7212f0721aed96150711febe97dd77 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 dd32297dd8d8da02781363b20dcbf6a0904e9ec6..a94750682dda5753ead9be7092acc3a48cad3e90 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 82eed6e3ca762b6251d55222ac160e75ab0e3a2a..4cb4e697775df176d11391e3b011f5bd5c1625aa 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 = [