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:
parent
3e155ecf93
commit
63bc9b8a4f
|
@ -4,6 +4,7 @@ coverage>=4.4.1
|
||||||
pycodestyle==2.3.1
|
pycodestyle==2.3.1
|
||||||
mock
|
mock
|
||||||
pytest
|
pytest
|
||||||
|
distro
|
||||||
-e ./zulip
|
-e ./zulip
|
||||||
-e ./zulip_bots
|
-e ./zulip_bots
|
||||||
-e ./zulip_botserver
|
-e ./zulip_botserver
|
||||||
|
|
|
@ -36,6 +36,7 @@ import random
|
||||||
import types
|
import types
|
||||||
from distutils.version import LooseVersion
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
|
import distro
|
||||||
from six.moves.configparser import SafeConfigParser
|
from six.moves.configparser import SafeConfigParser
|
||||||
from six.moves import urllib
|
from six.moves import urllib
|
||||||
import logging
|
import logging
|
||||||
|
@ -463,7 +464,7 @@ class Client(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if vendor == "Linux":
|
if vendor == "Linux":
|
||||||
vendor, vendor_version, dummy = platform.linux_distribution()
|
vendor, vendor_version, dummy = distro.linux_distribution()
|
||||||
elif vendor == "Windows":
|
elif vendor == "Windows":
|
||||||
vendor_version = platform.win32_ver()[1]
|
vendor_version = platform.win32_ver()[1]
|
||||||
elif vendor == "Darwin":
|
elif vendor == "Darwin":
|
||||||
|
|
Loading…
Reference in a new issue