Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dvc/commands/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from dvc.cli import completion
from dvc.cli.command import CmdBaseNoRepo
from dvc.exceptions import DvcException
from dvc.scm import CloneError

from ..cli.utils import append_doc_link

Expand Down Expand Up @@ -44,6 +45,9 @@ def _get_file_from_repo(self):
jobs=self.args.jobs,
)
return 0
except CloneError:
logger.exception(f"failed to get '{self.args.path}'")
return 1
except DvcException:
logger.exception(
"failed to get '{}' from '{}'".format(
Expand Down
4 changes: 4 additions & 0 deletions dvc/commands/imp.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from dvc.cli.command import CmdBase
from dvc.cli.utils import append_doc_link
from dvc.exceptions import DvcException
from dvc.scm import CloneError

logger = logging.getLogger(__name__)

Expand All @@ -26,6 +27,9 @@ def run(self):
meta=self.args.meta,
jobs=self.args.jobs,
)
except CloneError:
logger.exception(f"failed to import '{self.args.path}'")
return 1
except DvcException:
logger.exception(
"failed to import '{}' from '{}'.".format(
Expand Down
2 changes: 1 addition & 1 deletion dvc/scm.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def clone(url: str, to_path: str, **kwargs):
fetch_all_exps(git, url, progress=pbar.update_git)
return git
except InternalCloneError as exc:
raise CloneError(str(exc))
raise CloneError("SCM error") from exc


def resolve_rev(scm: "Git", rev: str) -> str:
Expand Down