commit c945bc6538eafe56104a283dd8fe83922415e716 Author: Damian Johnson atagar@torproject.org Date: Mon Jul 3 11:06:50 2017 -0700
Python3 fix for fallback_directories.cfg
Drop our use of cmp so this works with python3...
* /home/atagar/Desktop/stem/cache_fallback_directories.py line 57 - undefined name 'cmp' | for directory in sorted(latest_fallback_directories.values(), lambda x, y: cmp(x.fingerprint, y.fingerprint)): --- cache_fallback_directories.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cache_fallback_directories.py b/cache_fallback_directories.py index 4d5665b..0e61cf2 100755 --- a/cache_fallback_directories.py +++ b/cache_fallback_directories.py @@ -54,7 +54,7 @@ if __name__ == '__main__': conf.set('tor_commit', fallback_dir_commit) conf.set('stem_commit', stem_commit)
- for directory in sorted(latest_fallback_directories.values(), lambda x, y: cmp(x.fingerprint, y.fingerprint)): + for directory in sorted(latest_fallback_directories.values(), key = lambda x: x.fingerprint): fingerprint = directory.fingerprint conf.set('%s.address' % fingerprint, directory.address) conf.set('%s.or_port' % fingerprint, str(directory.or_port))
tor-commits@lists.torproject.org