[tor-commits] [oonib/master] Fix input descriptor

art at torproject.org art at torproject.org
Wed Sep 11 09:13:52 UTC 2013


commit 82933d4c2d8f812dde9790aaa7fcc4c8c2fe186f
Author: Arturo Filastò <art at fuffa.org>
Date:   Thu Aug 22 16:23:50 2013 +0200

    Fix input descriptor
    
    * Return the id in the /input API
---
 ...0e13536f6afe47a830bfb6b371b5cf65da66d7ad65137344679b24fdccd1.desc |    2 +-
 ...1ecd28bead38a7afeb4dda8ae3449d0fc2e1ba53fa7355f2799dce9af290.desc |    2 +-
 oonib/input/handlers.py                                              |    1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/data/inputs/37e60e13536f6afe47a830bfb6b371b5cf65da66d7ad65137344679b24fdccd1.desc b/data/inputs/37e60e13536f6afe47a830bfb6b371b5cf65da66d7ad65137344679b24fdccd1.desc
index feecc5a..953857d 100644
--- a/data/inputs/37e60e13536f6afe47a830bfb6b371b5cf65da66d7ad65137344679b24fdccd1.desc
+++ b/data/inputs/37e60e13536f6afe47a830bfb6b371b5cf65da66d7ad65137344679b24fdccd1.desc
@@ -1,2 +1,2 @@
-{id: 37e60e13536f6afe47a830bfb6b371b5cf65da66d7ad65137344679b24fdccd1, name: Alexa Top 1k domains, description: 'The Alexa list of most visited domains fetched from here: http://www.alexa.com/topsites'}
+{id: 37e60e13536f6afe47a830bfb6b371b5cf65da66d7ad65137344679b24fdccd1, name: Alexa Top 1k domains, description: 'The Alexa list of most visited domains fetched from here: http://www.alexa.com/topsites', version: 1, author: ooni, date: 2013-08-21T210221Z}
 
diff --git a/data/inputs/e0611ecd28bead38a7afeb4dda8ae3449d0fc2e1ba53fa7355f2799dce9af290.desc b/data/inputs/e0611ecd28bead38a7afeb4dda8ae3449d0fc2e1ba53fa7355f2799dce9af290.desc
index 07030c6..3eb5e14 100644
--- a/data/inputs/e0611ecd28bead38a7afeb4dda8ae3449d0fc2e1ba53fa7355f2799dce9af290.desc
+++ b/data/inputs/e0611ecd28bead38a7afeb4dda8ae3449d0fc2e1ba53fa7355f2799dce9af290.desc
@@ -1,2 +1,2 @@
-{id: e0611ecd28bead38a7afeb4dda8ae3449d0fc2e1ba53fa7355f2799dce9af290, name: Alexa Top 1m domains, description: 'The Alexa list of 1 million most visited domains fetched from here: http://www.alexa.com/topsites'}
+{id: e0611ecd28bead38a7afeb4dda8ae3449d0fc2e1ba53fa7355f2799dce9af290, name: Alexa Top 1m domains, description: 'The Alexa list of 1 million most visited domains fetched from here: http://www.alexa.com/topsites', version: 1, author: ooni, date: 2013-08-21T210221Z}
 
diff --git a/oonib/input/handlers.py b/oonib/input/handlers.py
index ed4c6b2..bba0af9 100644
--- a/oonib/input/handlers.py
+++ b/oonib/input/handlers.py
@@ -15,6 +15,7 @@ class InputDescHandler(OONIBHandler):
                 inputDesc = yaml.safe_load(f)
                 for k in ['name', 'description', 'version', 'author', 'date']:
                     response[k] = inputDesc[k]
+                response['id'] = inputID
             self.write(response)
         except IOError:
             log.err("No Input Descriptor found for id %s" % inputID) 





More information about the tor-commits mailing list