[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [nyx/master] Locale not provided for inbound connections



commit 8090afa865e5588f05e4eeba4ee9e52b7fc73942
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sun Nov 12 15:00:28 2017 -0800

    Locale not provided for inbound connections
    
    We only did a geoip lookup for certain catagories of connections. We've had a
    couple reports of geoip not working - not positive it's this but seems likely.
---
 nyx/panel/connection.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nyx/panel/connection.py b/nyx/panel/connection.py
index 0fb4889..09169d1 100644
--- a/nyx/panel/connection.py
+++ b/nyx/panel/connection.py
@@ -187,15 +187,15 @@ class ConnectionEntry(Entry):
     self._connection = connection
 
   def _get_lines(self):
-    fingerprint, nickname, locale = None, None, None
+    fingerprint, nickname = None, None
 
     if self.get_type() in (Category.OUTBOUND, Category.CIRCUIT, Category.DIRECTORY, Category.EXIT):
       fingerprint = nyx.tracker.get_consensus_tracker().get_relay_fingerprints(self._connection.remote_address).get(self._connection.remote_port)
-      locale = tor_controller().get_info('ip-to-country/%s' % self._connection.remote_address, None)
 
       if fingerprint:
         nickname = nyx.tracker.get_consensus_tracker().get_relay_nickname(fingerprint)
 
+    locale = tor_controller().get_info('ip-to-country/%s' % self._connection.remote_address, None)
     return [Line(self, LineType.CONNECTION, self._connection, None, fingerprint, nickname, locale)]
 
   def _get_type(self):
@@ -252,7 +252,7 @@ class CircuitEntry(Entry):
 
   def _get_lines(self):
     def line(fingerprint, line_type):
-      address, port, nickname, locale = '0.0.0.0', 0, None, None
+      address, port, nickname = '0.0.0.0', 0, None
       consensus_tracker = nyx.tracker.get_consensus_tracker()
 
       if fingerprint is not None:

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits