Category "cherry-pick"

Command executed via pexpect not taking effect

I am trying to cherry-pick gerrit reviews using a python script. I already have the string required to cherry-pick a review. I have used pexpect to automate the

cherry pick multiple commits as one without going through each one git apply patch

I have branch A with a few commits I need to cherry-pick into branch B. In the first cherry-picks I've added code that I've later removed in the last commits. W