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

[tor-commits] [stem/master] Fix test_version_position for python3



commit f5093b2ed67bcdad8d51d83db780c09bf142f57c
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Fri May 24 11:46:43 2019 -0700

    Fix test_version_position for python3
    
    Correcting a couple typing regressions that slipped in...
    
      https://trac.torproject.org/projects/tor/ticket/30597
---
 stem/descriptor/bandwidth_file.py      | 2 +-
 test/unit/descriptor/bandwidth_file.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/stem/descriptor/bandwidth_file.py b/stem/descriptor/bandwidth_file.py
index a26b2d57..1f000f50 100644
--- a/stem/descriptor/bandwidth_file.py
+++ b/stem/descriptor/bandwidth_file.py
@@ -104,7 +104,7 @@ def _date(val):
 
 
 def _csv(val):
-  return map(lambda v: v.strip(), val.split(',')) if val is not None else None
+  return list(map(lambda v: v.strip(), val.split(','))) if val is not None else None
 
 
 # mapping of attributes => (header, type)
diff --git a/test/unit/descriptor/bandwidth_file.py b/test/unit/descriptor/bandwidth_file.py
index 8cb0b942..3040c38b 100644
--- a/test/unit/descriptor/bandwidth_file.py
+++ b/test/unit/descriptor/bandwidth_file.py
@@ -85,14 +85,14 @@ new_header=neat stuff
 =====
 """.strip()
 
-WRONG_VERSION_POSITION = """
+WRONG_VERSION_POSITION = b"""
 1410723598
 file_created=2019-01-14T05:35:06
 version=1.1.0
 =====
 """.strip()
 
-RIGHT_VERSION_POSITION = """
+RIGHT_VERSION_POSITION = b"""
 1410723598
 version=1.1.0
 file_created=2019-01-14T05:35:06

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