Prevent errors in prompts if no info available.
Define empty functions instead of none at all if we can't figure out the
platform.
Merge pull request #2222 from jamesoff/fix-battery-plugin

Prevent errors in prompts if no battery info available.