logger: utils: fs: use lazy formatting

This commit is contained in:
Ruslan Kuprieiev
2020-01-19 11:53:29 +02:00
parent 65c0c7e60d
commit 19acded31f
2 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ from funcy.py3 import lmap, lfilter, lmapcat
from .exceptions import DvcException
from .lock import LockError
from .utils.fs import relpath
from .utils import relpath
INFO_SCHEMA = {"pid": int, "cmd": str}
+3 -5
View File
@@ -13,7 +13,6 @@ from dvc.system import System
from dvc.utils import dict_md5
from dvc.utils import fspath
from dvc.utils import fspath_py35
from dvc.utils import relpath
logger = logging.getLogger(__name__)
@@ -30,7 +29,7 @@ def fs_copy(src, dst):
def get_inode(path):
inode = System.inode(path)
logger.debug("Path {} inode {}".format(path, inode))
logger.debug("Path {} inode {}", path, inode)
return inode
@@ -131,10 +130,9 @@ def _chmod(func, p, excinfo):
def remove(path):
logger.debug("Removing '{}'", path)
path = fspath_py35(path)
logger.debug("Removing '{}'".format(relpath(path)))
try:
if os.path.isdir(path):
shutil.rmtree(path, onerror=_chmod)