commit f3b139105199861f69dd290d79f01177f3b9f812 Author: Sathyanarayanan Gunasekaran gsathya.ceg@gmail.com Date: Tue Sep 25 19:39:03 2012 +0530
Make lookup use hex_fingerprint --- pyonionoo/database.py | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/pyonionoo/database.py b/pyonionoo/database.py index 7ba7c02..99573f8 100644 --- a/pyonionoo/database.py +++ b/pyonionoo/database.py @@ -43,6 +43,7 @@ id INTEGER PRIMARY KEY, type CHARACTER, nickname STRING, fingerprint STRING, +hex_fingerprint STRING, running BOOLEAN, time_published STRING, or_port STRING, @@ -141,9 +142,9 @@ def update_databases(summary_file=None): # field in the flags/addresses table. Here we can avoid all those # selects, because the rowid attribute of the cursor is set to that # id field right after we execute the (individual) insert statements. - summary_fields = ('type', 'nickname', 'fingerprint', 'running', 'time_published', - 'or_port', 'dir_port', 'consensus_weight', 'country_code', - 'hostname', 'time_lookup', 'flags', 'addresses', 'search') + summary_fields = ('type', 'nickname', 'fingerprint', 'hex_fingerprint', 'running', + 'time_published', 'or_port', 'dir_port', 'consensus_weight', + 'country_code', 'hostname', 'time_lookup', 'flags', 'addresses', 'search')
insert_stmt = 'insert into %s (%s) values (%s)'
@@ -204,7 +205,7 @@ def query_summary_tbl(running_filter=None, type_filter=None, hex_fingerprint_fil if type_filter: clauses.append("type = '%s'" % type_filter) if hex_fingerprint_filter: - clauses.append("fingerprint = '%s'" % hex_fingerprint_filter) + clauses.append("hex_fingerprint = '%s'" % hex_fingerprint_filter) if country_filter: clauses.append("country_code = '%s'" % country_filter) where_clause = ('WHERE %s' % ' and '.join(clauses)) if clauses else ''
tor-commits@lists.torproject.org