dvc: show "Having any troubles?" only on unexpected errors (#4496)

* dvc: dont catch generic exceptions

* dvc: show "Having any troubles?" only on unexpected errors

Fixes #4126
This commit is contained in:
Ruslan Kuprieiev
2020-08-30 21:08:12 +03:00
committed by GitHub
parent 1a35128457
commit fcbbfac7f8
5 changed files with 10 additions and 14 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ def test_check_ignore_non_matching(tmp_dir, dvc, non_matching, caplog):
)
def test_check_ignore_error_args_cases(tmp_dir, dvc, args, caplog):
assert main(["check-ignore"] + args) == 255
assert ("Having any troubles?" in caplog.text) == ("-q" not in args)
assert "Having any troubles?" not in caplog.text
@pytest.mark.parametrize("path,ret", [({"dir": {}}, 0), ({"dir": "files"}, 1)])