Fixed python 3 support. Refs #17320