I don't think you need to catch all exceptions here. You can just catch ValueError, ObjectDoesNotExist, and MultipleObjectsReturned.