Fix traceback when powering off container.

Signed-off-by: Chuck Short <chuck.short@canonical.com>