def slicingDelSlicerProfile(slicer, name): try: slicingManager.delete_profile(slicer, name) except UnknownSlicer: return make_response("Unknown slicer {slicer}".format(**locals()), 404) return NO_CONTENT
def slicingDelSlicerProfile(slicer, name): try: slicingManager.delete_profile(slicer, name) except UnknownSlicer: return make_response("Unknown slicer {slicer}".format(**locals()), 404) except CouldNotDeleteProfile as e: return make_response("Could not delete profile {profile} for slicer {slicer}: {cause}".format(profile=name, slicer=slicer, cause=str(e.cause)), 500) return NO_CONTENT
def slicingDelSlicerProfile(slicer, name): try: slicingManager.delete_profile(slicer, name) except UnknownSlicer: abort(404) except CouldNotDeleteProfile as e: abort( 500, description="Could not delete profile for slicer: {cause}".format( cause=str(e.cause)), ) return NO_CONTENT
def slicingDelSlicerProfile(slicer, name): if not slicer in slicingManager.registered_slicers: return make_response("Unknown slicer {slicer}".format(**locals()), 404) slicingManager.delete_profile(slicer, name) return NO_CONTENT