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

[tor-commits] [nyx/master] Rename ConnectionPanelEntry to Entry



commit 6417b682ea456c0e67d8a6bbc1504b9a805710d1
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sun Aug 30 10:39:10 2015 -0700

    Rename ConnectionPanelEntry to Entry
    
    Class is already scoped to the connection panel so we don't need to be so
    verbose.
---
 nyx/connections/conn_panel.py |    4 ++--
 nyx/connections/entries.py    |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/nyx/connections/conn_panel.py b/nyx/connections/conn_panel.py
index 6c17cad..b9c4980 100644
--- a/nyx/connections/conn_panel.py
+++ b/nyx/connections/conn_panel.py
@@ -477,14 +477,14 @@ class ConnectionPanel(panel.Panel, threading.Thread):
     elif current_resolution_count == self._last_resource_fetch:
       return  # no new connections to process
 
-    new_entries = [entries.ConnectionPanelEntry.from_connection(conn) for conn in conn_resolver.get_value()]
+    new_entries = [entries.Entry.from_connection(conn) for conn in conn_resolver.get_value()]
 
     for circ in tor_controller().get_circuits([]):
       # Skips established single-hop circuits (these are for directory
       # fetches, not client circuits)
 
       if not (circ.status == 'BUILT' and len(circ.path) == 1):
-        new_entries.append(entries.ConnectionPanelEntry.from_circuit(circ))
+        new_entries.append(entries.Entry.from_circuit(circ))
 
     with self._vals_lock:
       # update stats for client and exit connections
diff --git a/nyx/connections/entries.py b/nyx/connections/entries.py
index 9c8d83e..00b0a0a 100644
--- a/nyx/connections/entries.py
+++ b/nyx/connections/entries.py
@@ -43,7 +43,7 @@ def to_unix_time(dt):
   return (dt - datetime.datetime(1970, 1, 1)).total_seconds()
 
 
-class ConnectionPanelEntry(object):
+class Entry(object):
   def __init__(self, connection_type, start_time):
     self.lines = []
     self._connection_type = connection_type
@@ -53,7 +53,7 @@ class ConnectionPanelEntry(object):
   def from_connection(conn):
     import nyx.connections.conn_entry
 
-    entry = ConnectionPanelEntry(get_type(conn), conn.start_time)
+    entry = Entry(get_type(conn), conn.start_time)
     entry.lines = [nyx.connections.conn_entry.ConnectionLine(entry, conn)]
     return entry
 
@@ -62,7 +62,7 @@ class ConnectionPanelEntry(object):
     import nyx.connections.circ_entry
     import nyx.connections.conn_entry
 
-    entry = ConnectionPanelEntry(nyx.connections.conn_entry.Category.CIRCUIT, to_unix_time(circ.created))
+    entry = Entry(nyx.connections.conn_entry.Category.CIRCUIT, to_unix_time(circ.created))
     entry.lines = [nyx.connections.circ_entry.CircHeaderLine(entry, circ)]
 
     for fingerprint, _ in circ.path:



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