Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
description: Resource not found
parameters:
- name: location
in: path
description: The location of the analysis status resource to delete.
required: true
type: string
"""
raise Exception("Not implemented")
try:
logging.debug("Location: {}".format(location))
except Exception:
logging.exception("Failed to delete analysis status")
response = Response(status=http.HTTP_RESPONSE_INTERNAL_SERVER_ERROR)
return response
- name: location
in: path
description: location of exposure resource to delete.
required: true
type: string
"""
logging.debug("Location: {}".format(location))
if location is None:
for filename in os.listdir(settings.get('server', 'INPUTS_DATA_DIRECTORY')):
filepath = os.path.join(settings.get('server', 'INPUTS_DATA_DIRECTORY'), filename)
if not filepath.endswith(TAR_FILE_SUFFIX):
continue
if not os.path.isfile(filepath):
continue
os.remove(filepath)
response = Response(status=http.HTTP_RESPONSE_OK)
else:
filename = str(location) + TAR_FILE_SUFFIX
filepath = os.path.join(settings.get('server', 'INPUTS_DATA_DIRECTORY'), filename)
if not os.path.exists(filepath):
response = Response(status=http.HTTP_RESPONSE_RESOURCE_NOT_FOUND)
else:
os.remove(filepath)
response = Response(status=http.HTTP_RESPONSE_OK)
return response