Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def run_analysis(c):
try:
upload_directory = os.path.join("upload", str(uuid.uuid1()))
shutil.copytree(
os.path.join(input_data_directory, "csv"),
upload_directory)
client = OasisAPIClient(api_url, logging.getLogger())
input_location = client.upload_inputs_from_directory(
upload_directory, do_il, do_validation=False)
client.run_analysis(
analysis_settings, input_location,
output_data_directory, do_clean=False)
c.increment_num_completed()
except Exception:
logging.exception("API test failed")
c.increment_num_failed()