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:
Martin Robinson 2023-05-29 13:56:03 +02:00
parent 9a93c21867
commit faa8c0e967
No known key found for this signature in database
GPG key ID: D56AA4FA55EFE6F8
4 changed files with 8 additions and 37 deletions

View file

@ -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: