Fix traceback in peer publish system

This fixes #5958 by adding a default value for the call to getattr().
Merge pull request #5968 from terminalmage/issue5958

Fix traceback in peer publish system