mirror of
https://github.com/servo/servo.git
synced 2025-07-25 08:10:21 +01:00
Remove more Python 2 compatibility code
- os.environ is always `str` in Python 3. - The only string type is `str` so we can stop using `six.str_types`. - `iteritems()` isn't necessary because dicts have the `items()` method.
This commit is contained in:
parent
9a93c21867
commit
faa8c0e967
4 changed files with 8 additions and 37 deletions
|
@ -13,7 +13,6 @@ import tempfile
|
|||
from typing import Optional, Tuple
|
||||
|
||||
import distro
|
||||
import six
|
||||
from .. import util
|
||||
from .base import Base
|
||||
|
||||
|
@ -65,8 +64,8 @@ class Linux(Base):
|
|||
|
||||
@staticmethod
|
||||
def get_distro_and_version() -> Tuple[str, str]:
|
||||
distrib = six.ensure_str(distro.name())
|
||||
version = six.ensure_str(distro.version())
|
||||
distrib = distro.name()
|
||||
version = distro.version()
|
||||
|
||||
if distrib in ['LinuxMint', 'Linux Mint', 'KDE neon', 'Pop!_OS']:
|
||||
if '.' in version:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue