mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-08 07:18:27 +01:00
- Remove deprecation warnings - Format error output and remove duplicated info Close #1086
20 lines
531 B
Python
20 lines
531 B
Python
import dvc.logger as logger
|
|
|
|
|
|
class CmdInit(object):
|
|
def __init__(self, args):
|
|
self.args = args
|
|
|
|
def run_cmd(self):
|
|
from dvc.project import Project, InitError
|
|
|
|
try:
|
|
self.project = Project.init('.',
|
|
no_scm=self.args.no_scm,
|
|
force=self.args.force)
|
|
self.config = self.project.config
|
|
except InitError:
|
|
logger.error('failed to initiate dvc')
|
|
return 1
|
|
return 0
|