commit 3830e30575f4b19664cf90c0abbaec1d28f3be77 Author: teor teor@torproject.org Date: Mon Dec 2 14:54:32 2019 +1000
generate: py3: Update using six.moves
Part of 28863. --- generateFallbackDirLine.py | 5 +++-- requirements.txt | 1 + 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/generateFallbackDirLine.py b/generateFallbackDirLine.py index 2177e00..f5e7424 100755 --- a/generateFallbackDirLine.py +++ b/generateFallbackDirLine.py @@ -7,7 +7,8 @@ # generateFallbackDirLine.py fingerprint ...
import sys -import urllib2 + +from six.moves import urllib
import stem import stem.descriptor.remote @@ -32,7 +33,7 @@ for fingerprint in sys.argv[1:]:
try: desc = stem.descriptor.remote.get_server_descriptors(fingerprint).run()[0] - except urllib2.HTTPError as exc: + except urllib.error.HTTPError as exc: if exc.code == 404: print('# %s not found in recent descriptors' % fingerprint) continue diff --git a/requirements.txt b/requirements.txt index 31ee04a..dc71795 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ python-dateutil +six stem
tor-commits@lists.torproject.org