Skip to content

Commit

Permalink
zulip: Use distro.linux_distribution instead of platform
Browse files Browse the repository at this point in the history
Python 3.8 removes `platform.linux_distribution` and `distro` is the
recommended replacement to use for this function.
  • Loading branch information
punchagan authored and timabbott committed Nov 2, 2019
1 parent 3e155ec commit 63bc9b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ coverage>=4.4.1
pycodestyle==2.3.1
mock
pytest
distro
-e ./zulip
-e ./zulip_bots
-e ./zulip_botserver
3 changes: 2 additions & 1 deletion zulip/zulip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import types
from distutils.version import LooseVersion

import distro
from six.moves.configparser import SafeConfigParser
from six.moves import urllib
import logging
Expand Down Expand Up @@ -463,7 +464,7 @@ def get_user_agent(self):
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":
Expand Down

0 comments on commit 63bc9b8

Please sign in to comment.