fix notification duplicate bug
authorvunhat_minh <vunhat_minh@dwango.co.jp>
Fri, 12 Sep 2014 03:50:57 +0000 (12:50 +0900)
committervunhat_minh <vunhat_minh@dwango.co.jp>
Fri, 12 Sep 2014 03:50:57 +0000 (12:50 +0900)
docs/conf.py
rainbowstream/rainbow.py
setup.py

index dfa7d32a6dcc0b46f9111d450a6f846eeabe476e..ad07f8a2ff879bb6576de3ca608db38a2a1954ee 100644 (file)
@@ -48,9 +48,9 @@ copyright = u'2014, Vu Nhat Minh'
 # built documents.
 #
 # The short X.Y version.
-version = '1.0.1'
+version = '1.0.2'
 # The full version, including alpha/beta/rc tags.
-release = '1.0.1'
+release = '1.0.2'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
index 6a565f9fb2bcb48864a25e5b9ef9ce52daf8278e..dd7fffcc950db8f85b8c4135572a6b7039c54ef6 100644 (file)
@@ -168,14 +168,12 @@ def init(args):
     g['themes'] = themes
     g['pause'] = False
     g['message_threads'] = {}
-    # Events
-    g['events'] = []
     # Startup cmd
     g['cmd'] = ''
     # Debug option default = True
     g['debug'] = True
     g['traceback'] = []
-    # Retweet of mine events
+    # Events
     c['events'] = []
     # Semaphore init
     c['lock'] = False
@@ -242,9 +240,8 @@ def notification():
     """
     Show notifications
     """
-    g['events'] = g['events'] + c['events']
-    if g['events']:
-        for e in g['events']:
+    if c['events']:
+        for e in c['events']:
             print_event(e)
         printNicely('')
     else:
@@ -1901,7 +1898,7 @@ def stream(domain, args, name='Rainbow Stream'):
                     time.sleep(0.5)
                 print_message(tweet['direct_message'])
             elif tweet.get('event'):
-                g['events'].append(tweet)
+                c['events'].append(tweet)
                 print_event(tweet)
     except TwitterHTTPError:
         printNicely('')
index ecadbcdf4abd1b2feb79c42c256b62cd27c9b38f..72076aea33375908e2065361d08f453bdeb5f1e0 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ import os
 import os.path
 
 # Bumped version
-version = '1.0.1'
+version = '1.0.2'
 
 # Require
 install_requires = [