mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-18 15:28:28 +01:00
Catch correct exception class in params.show()
This commit is contained in:
committed by
Peter Rowlands (변기호)
parent
84439e6a04
commit
b5c28dd9f9
@@ -4,6 +4,8 @@ from collections import defaultdict
|
||||
from copy import copy
|
||||
from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Tuple
|
||||
|
||||
from scmrepo.exceptions import SCMError
|
||||
|
||||
from dvc.dependency.param import ParamsDependency
|
||||
from dvc.repo import locked
|
||||
from dvc.repo.collect import collect
|
||||
@@ -117,8 +119,8 @@ def show(repo, revs=None, targets=None, deps=False, onerror: Callable = None):
|
||||
# Hide workspace params if they are the same as in the active branch
|
||||
try:
|
||||
active_branch = repo.scm.active_branch()
|
||||
except (TypeError, NoSCMError):
|
||||
# TypeError - detached head
|
||||
except (SCMError, NoSCMError):
|
||||
# SCMError - detached head
|
||||
# NoSCMError - no repo case
|
||||
pass
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user