djcheckup 0.4.2__tar.gz → 0.4.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: djcheckup
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: DJ Checkup is a security scanner for Django sites.
5
5
  Author: Stuart Maxwell
6
6
  Author-email: Stuart Maxwell <stuart@amanzi.nz>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "djcheckup"
3
- version = "0.4.2"
3
+ version = "0.4.3"
4
4
  description = "DJ Checkup is a security scanner for Django sites."
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Stuart Maxwell", email = "stuart@amanzi.nz" }]
@@ -390,7 +390,7 @@ Error message:
390
390
  name=check_name,
391
391
  result=CheckResult.FAILURE,
392
392
  severity_score=severity_weight,
393
- message=f"{error_message} ```\n\n> {e}```",
393
+ message=f"{error_message} \n\n> `{e}`",
394
394
  )
395
395
 
396
396
  self.context = create_context(self.url, self.client, response)
@@ -422,7 +422,15 @@ Error message:
422
422
  previous_results: dict[str, CheckResponse] = {"first_check": first_check}
423
423
 
424
424
  for check in checks:
425
- result = check.run(self.context, previous_results)
425
+ try:
426
+ result = check.run(self.context, previous_results)
427
+ except (httpx.RequestError, httpx.HTTPStatusError) as exc:
428
+ result = CheckResponse(
429
+ name=check.name,
430
+ result=CheckResult.FAILURE,
431
+ severity_score=check.severity,
432
+ message=f"An error occurred while running this check: \n\n> `{exc}`",
433
+ )
426
434
  site_check_results.check_results.append(result)
427
435
  previous_results[check.check_id] = result
428
436
 
File without changes
File without changes