Made a warning more pythonic.