From: Vincent Le Gallic Date: Sun, 5 Jan 2014 22:24:05 +0000 (+0100) Subject: Pour ignorer les données qu'on n'a pas à l'initialisation X-Git-Url: http://gitweb.pimeys.fr/?p=today.git;a=commitdiff_plain;h=b786fa6bc6d8b8d92d13a680da857a62d8fccef2 Pour ignorer les données qu'on n'a pas à l'initialisation --- 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()