Fixes ticket 16319

This is mainly a cleanup of the patch in 16319. I changed the formatting
of the success_message to use the .format() system instead.