commit d31aa2658630b4dd9d58008c99ac5db09190e18d Author: aagbsn aagbsn@extc.org Date: Sun Aug 18 23:01:02 2013 +0200
Return the descriptor as specified in oonib.md --- oonib/deck/api.py | 2 +- oonib/deck/handlers.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/oonib/deck/api.py b/oonib/deck/api.py index db6fb66..726b48a 100644 --- a/oonib/deck/api.py +++ b/oonib/deck/api.py @@ -5,6 +5,6 @@ from oonib import config deckAPI = [ (r"/deck", handlers.DeckListHandler), (r"/deck/([a-z0-9]{40})$", handlers.DeckDescHandler), - (r"/deck/([a-z0-9]{40})/file$", web.StaticFileHandler, {"path": + (r"/deck/([a-z0-9]{40})/yaml$", web.StaticFileHandler, {"path": config.main.deck_dir}), ] diff --git a/oonib/deck/handlers.py b/oonib/deck/handlers.py index b84d1de..1b67a3f 100644 --- a/oonib/deck/handlers.py +++ b/oonib/deck/handlers.py @@ -14,9 +14,8 @@ class DeckDescHandler(OONIBHandler): f = open(os.path.join(config.main.deck_dir, bn)) a = {} deckDesc = yaml.safe_load(f) - a['id'] = deckID - a['name'] = deckDesc['name'] - a['description'] = deckDesc['description'] + for k in ['name', 'description', 'version', 'author', 'date']: + a[k] = deckDesc[k] self.write(json.dumps(a)) except IOError: log.err("Deck %s missing" % deckID)
tor-commits@lists.torproject.org