From b786fa6bc6d8b8d92d13a680da857a62d8fccef2 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Sun, 5 Jan 2014 23:24:05 +0100 Subject: [PATCH] =?utf8?q?Pour=20ignorer=20les=20donn=C3=A9es=20qu'on=20n'?= =?utf8?q?a=20pas=20=C3=A0=20l'initialisation?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- today_server.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/today_server.py b/today_server.py index 7e31652..fbd650f 100755 --- a/today_server.py +++ b/today_server.py @@ -209,8 +209,11 @@ if __name__ == "__main__": DEBUG = True if sys.argv[1] == "check": news = fetch_all() - olds = get_file() - olds.update(news) + if "--init" in sys.argv: + olds = news + else: + olds = get_file() + olds.update(news) update_file(olds) elif sys.argv[1] == "whatsup": news = get_file() -- 2.39.2