Files
dvc/dvc/command/init.py
T
Mr. Outis 4c420d5f4d logger [rfc]: Use a module instead of a class
- Remove deprecation warnings
- Format error output and remove duplicated info

Close #1086
2018-12-23 21:06:39 -06:00

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