do nothing when meet other event in stream
authorOrakaro <nhatminh_179@hotmail.com>
Wed, 3 Sep 2014 12:28:40 +0000 (21:28 +0900)
committerOrakaro <nhatminh_179@hotmail.com>
Wed, 3 Sep 2014 12:28:40 +0000 (21:28 +0900)
docs/conf.py
rainbowstream/draw.py
setup.py

index 647e44c..e012675 100644 (file)
@@ -48,9 +48,9 @@ copyright = u'2014, Vu Nhat Minh'
 # built documents.
 #
 # The short X.Y version.
-version = '0.9.6'
+version = '0.9.7'
 # The full version, including alpha/beta/rc tags.
-release = '0.9.6'
+release = '0.9.7'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
index 5357945..e8cbcaf 100644 (file)
@@ -846,6 +846,13 @@ def notify_list_user_unsubscribed(e):
     print_list(target_object, noti=True)
 
 
+def nothing(e):
+    """
+    Do nothing for other event
+    """
+    return
+
+
 def print_event(e):
     """
     Notify an event
@@ -860,7 +867,7 @@ def print_event(e):
         'list_user_subscribed': notify_list_user_subscribed,
         'list_user_unsubscribed': notify_list_user_unsubscribed,
     }
-    event_dict[e['event']](e)
+    event_dict.get(e['event'],nothing)(e)
 
 
 def show_profile(u):
index 0cbc272..2863774 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ import os
 import os.path
 
 # Bumped version
-version = '0.9.6'
+version = '0.9.7'
 
 # Require
 install_requires = [