Python 3 doesn't like logging.exception in this situation