[tor-commits] [stem/master] DescriptorDownloader TypeError under python3
atagar at torproject.org
atagar at torproject.org
Tue Feb 23 16:56:21 UTC 2016
commit b6ba68cb16ad38204a414d238487122521f6cf4e
Author: Damian Johnson <atagar at torproject.org>
Date: Tue Feb 23 08:52:51 2016 -0800
DescriptorDownloader TypeError under python3
Oops, python3 collections issue from recent changes...
======================================================================
ERROR: test_persisting_a_consensus
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.2/dist-packages/mock/mock.py", line 1305, in patched
return func(*args, **keywargs)
File "/home/atagar/Desktop/stem/test/unit/tutorial_examples.py", line 343, in test_persisting_a_consensus
exec_documentation_example('persisting_a_consensus.py')
File "/home/atagar/Desktop/stem/test/unit/__init__.py", line 24, in exec_documentation_example
exec(code)
File "/home/atagar/Desktop/stem/docs/_static/example/persisting_a_consensus.py", line 4, in <module>
downloader = DescriptorDownloader()
File "/home/atagar/Desktop/stem/stem/descriptor/remote.py", line 404, in __init__
directories = get_authorities().values() + FallbackDirectory.from_cache().values()
TypeError: unsupported operand type(s) for +: 'dict_values' and 'dict_values'
---
stem/descriptor/remote.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stem/descriptor/remote.py b/stem/descriptor/remote.py
index e0923dc..f96d6a7 100644
--- a/stem/descriptor/remote.py
+++ b/stem/descriptor/remote.py
@@ -401,7 +401,7 @@ class DescriptorDownloader(object):
def __init__(self, use_mirrors = False, **default_args):
self._default_args = default_args
- directories = get_authorities().values() + FallbackDirectory.from_cache().values()
+ directories = list(get_authorities().values()) + list(FallbackDirectory.from_cache().values())
self._endpoints = [(directory.address, directory.dir_port) for directory in directories]
if use_mirrors:
More information about the tor-commits
mailing list