Skip to content

Commit

Permalink
Remove usage of fs_encode
Browse files Browse the repository at this point in the history
See also #5062
  • Loading branch information
oz123 committed Oct 5, 2022
1 parent ea84f68 commit 1f836f6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from pipenv.exceptions import VirtualenvActivationException
from pipenv.utils.processes import subprocess_run
from pipenv.vendor import toml, tomlkit
from pipenv.vendor.vistir.compat import fs_encode
from pipenv.vendor.vistir.contextmanagers import temp_environ
from pipenv.vendor.vistir.misc import run
from pipenv.vendor.vistir.path import (
Expand Down Expand Up @@ -412,12 +411,11 @@ def lockfile_path(self):


def _rmtree_func(path, ignore_errors=True, onerror=None):
directory = fs_encode(path)
shutil_rmtree = _rmtree
if onerror is None:
onerror = handle_remove_readonly
try:
shutil_rmtree(directory, ignore_errors=ignore_errors, onerror=onerror)
shutil_rmtree(path, ignore_errors=ignore_errors, onerror=onerror)
except (OSError, FileNotFoundError, PermissionError) as exc:
# Ignore removal failures where the file doesn't exist
if exc.errno != errno.ENOENT:
Expand Down

0 comments on commit 1f836f6

Please sign in to comment.