Skip to content

Commit

Permalink
logger: utils: fs: use lazy formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop committed Jan 19, 2020
1 parent 65c0c7e commit 19acded
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dvc/rwlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from .exceptions import DvcException
from .lock import LockError
from .utils.fs import relpath
from .utils import relpath

INFO_SCHEMA = {"pid": int, "cmd": str}

Expand Down
8 changes: 3 additions & 5 deletions dvc/utils/fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
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__)
Expand All @@ -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


Expand Down Expand Up @@ -131,10 +130,9 @@ def _chmod(func, p, excinfo):


def remove(path):
path = fspath_py35(path)

logger.debug("Removing '{}'".format(relpath(path)))
logger.debug("Removing '{}'", path)

path = fspath_py35(path)
try:
if os.path.isdir(path):
shutil.rmtree(path, onerror=_chmod)
Expand Down

0 comments on commit 19acded

Please sign in to comment.