From: vunhat_minh Date: Thu, 24 Jul 2014 07:21:20 +0000 (+0900) Subject: notify config changed in draw X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=92685d214c86086691e97d63f2fb1acfa3d85cbf;p=rainbowstream.git notify config changed in draw --- diff --git a/rainbowstream/draw.py b/rainbowstream/draw.py index 2441662..8bd0c50 100644 --- a/rainbowstream/draw.py +++ b/rainbowstream/draw.py @@ -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'] diff --git a/setup.py b/setup.py index c781b21..6623f15 100644 --- 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 = [