notify config changed in draw
authorvunhat_minh <vunhat_minh@dwango.co.jp>
Thu, 24 Jul 2014 07:21:20 +0000 (16:21 +0900)
committervunhat_minh <vunhat_minh@dwango.co.jp>
Thu, 24 Jul 2014 07:21:20 +0000 (16:21 +0900)
rainbowstream/draw.py
setup.py

index 24416623de480802460c92dfd56d31944c96625e..8bd0c50cd759cb11c0fb57affa2ed1c44ff7246f 100644 (file)
@@ -111,6 +111,19 @@ def show_calendar(month, date, rel):
         printNicely(' '.join(ary))
 
 
         printNicely(' '.join(ary))
 
 
+def check_config():
+   """
+   Check if config is changed
+   """
+   changed = False
+   data = get_all_config()
+   for key in data:
+       if data[key] != c[key]:
+           changed = True
+   if changed:
+       reload_config()
+
+
 def check_theme():
     """
     Check current theme and update if necessary
 def check_theme():
     """
     Check current theme and update if necessary
@@ -145,6 +158,7 @@ def draw(t, iot=False, keyword=None, check_semaphore=False, fil=[], ig=[]):
     """
 
     check_theme()
     """
 
     check_theme()
+    check_config()
     # Retrieve tweet
     tid = t['id']
     text = t['text']
     # Retrieve tweet
     tid = t['id']
     text = t['text']
index c781b211c94abe700fe5cc046d7e7215d92495e0..6623f15630b7d20618e613dbe4f71515f12f83ac 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
 import os, sys
 
 # Bumped version
 import os, sys
 
 # Bumped version
-version = '0.4.3'
+version = '0.4.4'
 
 # Require
 install_requires = [
 
 # Require
 install_requires = [