mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-19 23:11:44 +01:00
Use DvcLock from CmdBase class only
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from dvc.command.common.base import CmdBase, DvcLock
|
||||
from dvc.command.common.base import CmdBase
|
||||
from dvc.logger import Logger
|
||||
|
||||
import dvc.data_cloud as cloud
|
||||
@@ -9,8 +9,7 @@ class CmdDataPull(CmdBase):
|
||||
super(CmdDataPull, self).__init__(settings)
|
||||
|
||||
def run(self):
|
||||
with DvcLock(self.is_locker, self.git):
|
||||
self.cloud.pull(self.parsed_args.targets, self.parsed_args.jobs)
|
||||
self.cloud.pull(self.parsed_args.targets, self.parsed_args.jobs)
|
||||
|
||||
|
||||
class CmdDataPush(CmdBase):
|
||||
@@ -18,8 +17,8 @@ class CmdDataPush(CmdBase):
|
||||
super(CmdDataPush, self).__init__(settings)
|
||||
|
||||
def run(self):
|
||||
with DvcLock(self.is_locker, self.git):
|
||||
self.cloud.push(self.parsed_args.targets, self.parsed_args.jobs)
|
||||
self.cloud.push(self.parsed_args.targets, self.parsed_args.jobs)
|
||||
|
||||
|
||||
class CmdDataStatus(CmdBase):
|
||||
def __init__(self, settings):
|
||||
@@ -41,9 +40,6 @@ class CmdDataStatus(CmdBase):
|
||||
Logger.info('\t{}\t{}'.format(prefix_map[ret], target.data.dvc))
|
||||
|
||||
def run(self):
|
||||
with DvcLock(self.is_locker, self.git):
|
||||
status = self.cloud.status(self.parsed_args.targets, self.parsed_args.jobs)
|
||||
|
||||
self._show(status)
|
||||
|
||||
return 0
|
||||
status = self.cloud.status(self.parsed_args.targets, self.parsed_args.jobs)
|
||||
self._show(status)
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user