Refactor: python: Update pacemaker module to address pylint errors.
This fixes a variety of warnings and errors including missing
docstrings, useless pass statements, refactorings, unnecessary
semicolons, use of context managers, and more.
With this, pylint finds nothing wrong.