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 2441662..8bd0c50 100644 (file)
@@ -111,6 +111,19 @@ def show_calendar(month, date, rel):
         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
@@ -145,6 +158,7 @@ def draw(t, iot=False, keyword=None, check_semaphore=False, fil=[], ig=[]):
     """
 
     check_theme()
+    check_config()
     # Retrieve tweet
     tid = t['id']
     text = t['text']
index c781b21..6623f15 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
 import os, sys
 
 # Bumped version
-version = '0.4.3'
+version = '0.4.4'
 
 # Require
 install_requires = [