Skip to content
Snippets Groups Projects
Commit af52d8b1 authored by Damian Johnson's avatar Damian Johnson
Browse files

Tests fail to run with python 3.8

Python's platform module removed its linux_distribution() method...

  https://trac.torproject.org/projects/tor/ticket/30847
  https://docs.python.org/3/library/platform.html#platform.linux_distribution
  https://stackoverflow.com/questions/49554443/platform-linux-distribution-deprecated-what-are-the-alternatives

This method was only used for display purposes to indicate the OS where the
tests were ran. No big whoop if we simply omit the information.
parent 3efc9c5c
Branches
Tags
No related merge requests found
......@@ -120,7 +120,10 @@ def _check_platform_version():
extra = platform.release()
elif platform.system() == 'Darwin':
extra = platform.release()
elif platform.system() == 'Linux':
elif platform.system() == 'Linux' and hasattr(platform, 'linux_distribution'):
# TODO: platform.linux_distribution() was removed in python 3.8
# https://trac.torproject.org/projects/tor/ticket/30847
extra = ' '.join(platform.linux_distribution()[:2])
else:
extra = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment