Can't catch GitCommandError

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

import git
...
git = repo.git
try:
    git.cherry_pick(commit)
except git.GitCommandError as e:
    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 do except Exception as e... But, I would like to be explicit to defer code-paths.