Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

src/d/y/dycapo-HEAD/rest/wrappers/trip.py   dycapo(Download)
                return piston.utils.rc.FORBIDDEN
            if trip.active and not data['active']:
                result = server.driver.finishTrip(trip, current_user)
            elif not trip.active and data['active']:
                result = server.driver.startTrip(trip, current_user)
            if trip.author.id != current_user.id:
                return piston.utils.rc.FORBIDDEN
            result = server.driver.finishTrip(trip, current_user)
            return rest.utils.extract_result_from_response(result)
        except server.models.Trip.DoesNotExist: