[tor-commits] [stem/master] Add comments + slight style changes for ignored content in unpacking

atagar at torproject.org atagar at torproject.org
Mon Jun 18 20:10:28 UTC 2018


commit e20f71923c79c8fcecbe1adee97369c4b0433562
Author: Dave Rolek <dmr-x at riseup.net>
Date:   Sun Jun 3 17:34:48 2018 +0000

    Add comments + slight style changes for ignored content in unpacking
---
 stem/client/cell.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/stem/client/cell.py b/stem/client/cell.py
index b90fb7a6..1b30db6c 100644
--- a/stem/client/cell.py
+++ b/stem/client/cell.py
@@ -347,7 +347,9 @@ class RelayCell(CircuitCell):
     stream_id, content = Size.SHORT.pop(content)
     digest, content = Size.LONG.pop(content)
     data_len, content = Size.SHORT.pop(content)
-    data, content = split(content, data_len)
+    data, _ = split(content, data_len)
+
+    # remaining content (if any) is thrown out (ignored)
 
     return RelayCell(circ_id, command, data, digest, stream_id, recognized)
 
@@ -546,6 +548,8 @@ class NetinfoCell(Cell):
       addr, content = Address.pop(content)
       sender_addresses.append(addr)
 
+    # remaining content (if any) is thrown out (ignored)
+
     return NetinfoCell(receiver_address, sender_addresses, datetime.datetime.utcfromtimestamp(timestamp))
 
   def __hash__(self):
@@ -637,6 +641,8 @@ class CertsCell(Cell):
       cert, content = Certificate.pop(content)
       certs.append(cert)
 
+    # remaining content (if any) is thrown out (ignored)
+
     return CertsCell(certs)
 
   def __hash__(self):
@@ -692,6 +698,8 @@ class AuthChallengeCell(Cell):
       method, content = Size.SHORT.pop(content)
       methods.append(method)
 
+    # remaining content (if any) is thrown out (ignored)
+
     return AuthChallengeCell(methods, challenge)
 
   def __hash__(self):





More information about the tor-commits mailing list