[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [sbws/master] Stop including \n EOL when parsing V110 header
commit 48fa53dd3a38f021654fba4d9be65be7d2af7ac4
Author: juga0 <juga@xxxxxxxxxx>
Date: Wed Aug 29 14:49:37 2018 +0000
Stop including \n EOL when parsing V110 header
---
sbws/lib/v3bwfile.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py
index b068075..576345e 100644
--- a/sbws/lib/v3bwfile.py
+++ b/sbws/lib/v3bwfile.py
@@ -146,7 +146,8 @@ class V3BWHeader(object):
for l in lines[:index_terminator]
if l.split(KEYVALUE_SEP_V110)[0] in ALL_KEYVALUES])
h = cls(ts, **kwargs)
- return h, lines[index_terminator + 1:]
+ # last line is new line
+ return h, lines[index_terminator + 1:-1]
@classmethod
def from_text_v110(self, text):
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits