From cffc9c8ed9ca9c97fd18b3c09bfe3dc9eaec7abc Mon Sep 17 00:00:00 2001 From: Aman Sharma Date: Sun, 3 Nov 2019 02:38:50 +0530 Subject: [PATCH] Remove unnecessary wrapping of path --- .gitignore | 1 + dvc/state.py | 1 - dvc/utils/fs.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d2a206fe3..33be5cb20 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ neatlynx/__pycache__ cache *.pyc .env/ +.env2.7/ cache .dvc.conf.lock diff --git a/dvc/state.py b/dvc/state.py index 1d8e3623d..dacc07693 100644 --- a/dvc/state.py +++ b/dvc/state.py @@ -369,7 +369,6 @@ class State(object): # pylint: disable=too-many-instance-attributes """ assert path_info.scheme == "local" assert checksum is not None - assert os.path.exists(fspath_py35(path_info)) actual_mtime, actual_size = get_mtime_and_size( diff --git a/dvc/utils/fs.py b/dvc/utils/fs.py index edbcec3c7..6ded4cefd 100644 --- a/dvc/utils/fs.py +++ b/dvc/utils/fs.py @@ -26,7 +26,7 @@ def get_mtime_and_size(path, dvcignore): files_mtimes = {} for file_path in walk_files(path, dvcignore): try: - stat = os.stat(fspath_py35(file_path)) + stat = os.stat(file_path) except OSError as exc: # NOTE: broken symlink case. if exc.errno != errno.ENOENT: