mirror of
https://github.com/servo/servo.git
synced 2025-07-28 01:30:32 +01:00
mach: remove python2 compatibility code (#33410)
* util.py: Remove six We don't need to support python2 anymore, so we can just use `str(x)` instead of `six.ensure_str(x)` Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * config.py: Remove six We don't need to support python2 anymore, so we can just use `str(x)` instead of `six.ensure_str(x)` Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * main.py: Remove six We don't need to support python2 anymore, so we can just use `str(x)` instead of `six.ensure_str(x)` Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * main.py: Fix `--settings` being ignored Previously `paths` was unused in this function, and the usage for the settings_file would have no effect. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * terminal.py: Remove `six` Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * registrar.py: Remove `six` Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * mach/util.py: Remove `six` Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * mach: Remove python2 from the list of programming languages Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
parent
ed5dc43f16
commit
b42f5eaa17
7 changed files with 13 additions and 25 deletions
|
@ -19,7 +19,6 @@ import urllib.request
|
|||
import zipfile
|
||||
from typing import Dict, List, Union
|
||||
|
||||
import six
|
||||
from io import BufferedIOBase, BytesIO
|
||||
from socket import error as socket_error
|
||||
|
||||
|
@ -188,7 +187,7 @@ def append_paths_to_env(env: Dict[str, str], key: str, paths: Union[str, List[st
|
|||
|
||||
existing_value = env.get(key, None)
|
||||
if existing_value:
|
||||
new_value = six.ensure_str(existing_value) + os.pathsep + paths
|
||||
new_value = str(existing_value) + os.pathsep + paths
|
||||
else:
|
||||
new_value = paths
|
||||
env[key] = new_value
|
||||
|
@ -201,7 +200,7 @@ def prepend_paths_to_env(env: Dict[str, str], key: str, paths: Union[str, List[s
|
|||
existing_value = env.get(key, None)
|
||||
new_value = paths
|
||||
if existing_value:
|
||||
new_value += os.pathsep + six.ensure_str(existing_value)
|
||||
new_value += os.pathsep + str(existing_value)
|
||||
env[key] = new_value
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue