diff --git a/dvc/command/lock.py b/dvc/command/lock.py index 12c0f82eb..00f51b25c 100644 --- a/dvc/command/lock.py +++ b/dvc/command/lock.py @@ -9,7 +9,7 @@ class CmdLockBase(CmdBase): self.project.lock_stage(target, unlock=unlock) except DvcException as ex: msg = 'Failed to {}lock \'{}\'' - msg.format('un' if unlock else '', target) + msg = msg.format('un' if unlock else '', target) self.project.logger.error(msg, ex) return 1 return 0