Fixed a python error. Refs #9573.