Corrections/cleanup from zypper batching refactor

This builds on pull request #7510, correcting a logic issue as well as
making some PEP8 fixes.
Merge pull request #7550 from terminalmage/zypper-cleanup

Corrections/cleanup from zypper batching refactor