Done (kind of), I changed it so that it catches AttributeErrors, which seems roughly equivalent to what you have above.