zulip: Use distro.linux_distribution instead of platform

Python 3.8 removes `platform.linux_distribution` and `distro` is the
recommended replacement to use for this function.
This commit is contained in:
Puneeth Chaganti 2019-11-01 12:45:28 +05:30 committed by Tim Abbott
parent 3e155ecf93
commit 63bc9b8a4f
2 changed files with 3 additions and 1 deletions

View file

@ -4,6 +4,7 @@ coverage>=4.4.1
pycodestyle==2.3.1
mock
pytest
distro
-e ./zulip
-e ./zulip_bots
-e ./zulip_botserver

View file

@ -36,6 +36,7 @@ import random
import types
from distutils.version import LooseVersion
import distro
from six.moves.configparser import SafeConfigParser
from six.moves import urllib
import logging
@ -463,7 +464,7 @@ class Client(object):
pass
if vendor == "Linux":
vendor, vendor_version, dummy = platform.linux_distribution()
vendor, vendor_version, dummy = distro.linux_distribution()
elif vendor == "Windows":
vendor_version = platform.win32_ver()[1]
elif vendor == "Darwin":