|
21 | 21 | import lit.ShUtil as ShUtil |
22 | 22 | import lit.Test as Test |
23 | 23 | import lit.util |
24 | | -from lit.util import to_bytes, to_string, to_unicode |
| 24 | +from lit.util import to_bytes, to_string |
25 | 25 | from lit.BooleanExpression import BooleanExpression |
26 | 26 |
|
27 | 27 |
|
@@ -463,7 +463,7 @@ def executeBuiltinMkdir(cmd, cmd_shenv): |
463 | 463 | exitCode = 0 |
464 | 464 | for dir in args: |
465 | 465 | dir = pathlib.Path(dir) |
466 | | - cwd = pathlib.Path(to_unicode(cmd_shenv.cwd)) |
| 466 | + cwd = pathlib.Path(cmd_shenv.cwd) |
467 | 467 | if not dir.is_absolute(): |
468 | 468 | dir = lit.util.abs_path_preserve_drive(cwd / dir) |
469 | 469 | if parent: |
@@ -508,8 +508,6 @@ def on_rm_error(func, path, exc_info): |
508 | 508 | exitCode = 0 |
509 | 509 | for path in args: |
510 | 510 | cwd = cmd_shenv.cwd |
511 | | - path = to_unicode(path) if kIsWindows else to_bytes(path) |
512 | | - cwd = to_unicode(cwd) if kIsWindows else to_bytes(cwd) |
513 | 511 | if not os.path.isabs(path): |
514 | 512 | path = lit.util.abs_path_preserve_drive(os.path.join(cwd, path)) |
515 | 513 | if force and not os.path.exists(path): |
@@ -703,9 +701,6 @@ def processRedirects(cmd, stdin_source, cmd_shenv, opened_files): |
703 | 701 | else: |
704 | 702 | # Make sure relative paths are relative to the cwd. |
705 | 703 | redir_filename = os.path.join(cmd_shenv.cwd, name) |
706 | | - redir_filename = ( |
707 | | - to_unicode(redir_filename) if kIsWindows else to_bytes(redir_filename) |
708 | | - ) |
709 | 704 | fd = open(redir_filename, mode) |
710 | 705 | # Workaround a Win32 and/or subprocess bug when appending. |
711 | 706 | # |
|
0 commit comments