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

[tor-commits] [stem/master] With python3 map can't be indexed into



commit 0126c95718faba2a0a9d701fc225e40ced463680
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sun May 28 16:03:21 2017 -0700

    With python3 map can't be indexed into
    
    With python 3.2 it's fine but our integ tests fail under 3.6 with...
    
      ======================================================================
      ERROR: test_install
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/home/atagar/Desktop/stem/test/require.py", line 43, in wrapped
          return func(self, *args, **kwargs)
        File "/home/atagar/Desktop/stem/test/integ/installation.py", line 118, in test_install
          self.assertEqual(stem.__version__, stem.util.system.call([PYTHON_EXE, '-c', "import sys;sys.path.insert(0, '%s');import stem;print(stem.__version__)" % INSTALL_PATH])[0])
        File "/home/atagar/Desktop/stem/stem/util/system.py", line 1083, in call
          is_shell_command = command_list[0] in SHELL_COMMANDS
      TypeError: 'map' object is not subscriptable
---
 stem/util/system.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stem/util/system.py b/stem/util/system.py
index 9f85304..69ec979 100644
--- a/stem/util/system.py
+++ b/stem/util/system.py
@@ -1074,7 +1074,7 @@ def call(command, default = UNDEFINED, ignore_exit_status = False, timeout = Non
   if isinstance(command, str):
     command_list = command.split(' ')
   else:
-    command_list = map(str, command)
+    command_list = list(map(str, command))
 
   exit_status, runtime, stdout, stderr = None, None, None, None
   start_time = time.time()



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