json.dump(news, f)
f.close()
-FETCHS = {
- }
-
-def fetch_all():
- """Va chercher sur les différents sites les nouveaux trucs."""
- news = {}
- for (k, f) in FETCHS.iteritems():
- try:
- news[k] = f()
- except Exception as e:
- raise
- news.update(gather.gather())
- return news
def sync():
"""Reçoit une requête de synchronisation."""
if __name__ == "__main__":
DEBUG = ("--debug" in sys.argv) or ("--verbose" in sys.argv) or serverconfig.DEBUG
if sys.argv[1] == "check":
- news = fetch_all()
+ news = gather.gather()
if "--init" in sys.argv:
olds = news
else: