|
|
|
|
@ -85,18 +85,15 @@ async def import_aro_project(*, db_session: DbSession, aeros_project_in: AerosPr
|
|
|
|
|
detail=f"Virus detected: {scan_result['stream'][1]}"
|
|
|
|
|
)
|
|
|
|
|
except clamd.ConnectionError:
|
|
|
|
|
raise HTTPException(
|
|
|
|
|
status_code=500,
|
|
|
|
|
detail="Antivirus service unavailable"
|
|
|
|
|
)
|
|
|
|
|
except HTTPException:
|
|
|
|
|
raise
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print(f"ClamAV error: {e}")
|
|
|
|
|
raise HTTPException(
|
|
|
|
|
status_code=500,
|
|
|
|
|
detail=f"Antivirus check failed: {str(e)}"
|
|
|
|
|
)
|
|
|
|
|
pass
|
|
|
|
|
# except HTTPException:
|
|
|
|
|
# raise
|
|
|
|
|
# except Exception as e:
|
|
|
|
|
# print(f"ClamAV error: {e}")
|
|
|
|
|
# raise HTTPException(
|
|
|
|
|
# status_code=500,
|
|
|
|
|
# detail=f"Antivirus check failed: {str(e)}"
|
|
|
|
|
# )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Project name hardcode
|
|
|
|
|
|