mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-13 15:28:27 +01:00
logger: utils: fs: use lazy formatting
This commit is contained in:
+1
-1
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user