Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Can't catch GitCommandError #1924

Closed as not planned
Closed as not planned
@zerothi

Description

@zerothi

I am trying to do a cherry-pick, but abort when it fails:

importgit...git=repo.gittry:git.cherry_pick(commit)exceptgit.GitCommandErrorase:git.cherry_pick(abort=True)...

but I get this:

    except git.GitCommandError as e:   TypeError: catching classes that do not inherit from BaseException is not allowed

Now I can obviously doexcept Exception as e... But, I would like to be explicit to defer code-paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp