Unverified Commit e660f097 authored by Georg Koppen's avatar Georg Koppen
Browse files

Bug 40003: Port doctor to Python 3

parent 27f9e5c8
#!/usr/bin/env python
# Copyright 2013-2020, Damian Johnson and The Tor Project
#!/usr/bin/env python3
# Copyright 2013-2021, Damian Johnson and The Tor Project
# See LICENSE for licensing information
"""
......
#!/usr/bin/env python
# Copyright 2013-2019, Damian Johnson and The Tor Project
#!/usr/bin/env python3
# Copyright 2013-2021, Damian Johnson and The Tor Project
# See LICENSE for licensing information
"""
......
#!/usr/bin/env python
# Copyright 2016-2020, Damian Johnson and The Tor Project
#!/usr/bin/env python3
# Copyright 2016-2021, Damian Johnson and The Tor Project
# See LICENSE for licensing information
"""
......
#!/usr/bin/env python
# Copyright 2015-2019, Damian Johnson and The Tor Project
#!/usr/bin/env python3
# Copyright 2015-2021, Damian Johnson and The Tor Project
# See LICENSE for licensing information
"""
......
#!/usr/bin/env python
# Copyright 2017-2019, Damian Johnson and The Tor Project
#!/usr/bin/env python3
# Copyright 2017-2021, Damian Johnson and The Tor Project
# See LICENSE for licensing information
"""
......@@ -11,7 +11,7 @@ Checks for outdated versions on the packages wiki...
import collections
import re
import time
import urllib2
import urllib.request
import util
......@@ -95,7 +95,7 @@ log = util.get_logger('package_versions')
def fetch_url(url):
for i in range(3):
try:
return urllib2.urlopen(url, timeout = 5).read()
return urllib.request.urlopen(url, timeout = 5).read()
except Exception as exc:
if i < 2:
time.sleep(2 ** i)
......@@ -117,7 +117,7 @@ def wiki_package_versions():
expected_count = sum([len(packages) for project, packages in PACKAGES])
for line in request.splitlines():
m = re.search('<b>Version:</b> <a href=".*">(.*)</a>', line)
m = re.search(b'<b>Version:</b> <a href=".*">(.*)</a>', line)
if m:
version_entries.append(m.group(1))
......
#!/usr/bin/env python
# Copyright 2018-2020, Damian Johnson and The Tor Project
#!/usr/bin/env python3
# Copyright 2018-2021, Damian Johnson and The Tor Project
# See LICENSE for licensing information
"""
......
#!/usr/bin/env python
# Copyright 2013-2019, Damian Johnson and The Tor Project
#!/usr/bin/env python3
# Copyright 2013-2021, Damian Johnson and The Tor Project
# See LICENSE for licensing information
"""
......
#!/usr/bin/env python
# Copyright 2016-2019, Damian Johnson and The Tor Project
#!/usr/bin/env python3
# Copyright 2016-2021, Damian Johnson and The Tor Project
# See LICENSE for licensing information
"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment