mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-29 15:28:28 +01:00
Small sync and import fixes
This commit is contained in:
@@ -7,13 +7,14 @@ from dvc.runtime import Runtime
|
||||
from dvc.system import System
|
||||
from dvc.data_cloud import DataCloud
|
||||
|
||||
#FIXME add cmdline argument and config option for POOL_SIZE
|
||||
POOL_SIZE = 4
|
||||
|
||||
|
||||
class DataSyncError(DvcException):
|
||||
def __init__(self, msg):
|
||||
super(DataSyncError, self).__init__('Data sync error: {}'.format(msg))
|
||||
|
||||
|
||||
class CmdDataSync(CmdBase):
|
||||
def __init__(self, settings):
|
||||
super(CmdDataSync, self).__init__(settings)
|
||||
@@ -30,6 +31,9 @@ class CmdDataSync(CmdBase):
|
||||
pool = ThreadPool(processes=POOL_SIZE)
|
||||
targets = []
|
||||
|
||||
if len(self.parsed_args.targets) == 0:
|
||||
raise DataSyncError('Sync target is not specified')
|
||||
|
||||
for target in self.parsed_args.targets:
|
||||
if System.islink(target):
|
||||
targets.append(target)
|
||||
|
||||
Reference in New Issue
Block a user