Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch correct exception class in params.show() #7750

Merged
merged 1 commit into from May 23, 2022

Conversation

Suor
Copy link
Contributor

@Suor Suor commented May 16, 2022

No description provided.

@Suor Suor requested a review from a team as a code owner May 16, 2022 14:26
@Suor Suor requested a review from dtrifiro May 16, 2022 14:26
@skshetry skshetry requested a review from pmrowla May 16, 2022 14:31
@skshetry skshetry added bugfix fixes bug git Related to git and git backends labels May 16, 2022
@@ -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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this may still get raised on a gitpython backend, which probably should be handled upstream.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have this construction in metrics.show() too, and it doesn't have TypeError there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, maybe moving this to commands code will improve code - this feels like a presentation logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix fixes bug git Related to git and git backends
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants