From 92685d214c86086691e97d63f2fb1acfa3d85cbf Mon Sep 17 00:00:00 2001 From: vunhat_minh Date: Thu, 24 Jul 2014 16:21:20 +0900 Subject: [PATCH] notify config changed in draw --- rainbowstream/draw.py | 14 ++++++++++++++ setup.py | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) 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 = [ -- 2.25.1