From 70a421b1ebf2eea93cf03e99323a15f822b68475 Mon Sep 17 00:00:00 2001 From: Artturin Date: Wed, 18 Oct 2023 02:40:10 +0300 Subject: [PATCH] fix "error: cannot find flake 'flake:None' in the flake registries" Culprit found with: ``` python -m trace --ignore-dir "$(python -c 'import os, sys; print(os.pathsep.join(sys.path[1:]))')" -t $NIXGITS/nixpkgs-review/result/bin/.nixpkgs-review-wrapped pr 261631 ``` from the comments of https://stackoverflow.com/a/33449763. `nix log` had `None^*` as the path. --- nixpkgs_review/report.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixpkgs_review/report.py b/nixpkgs_review/report.py index 679d4913..9ad9f4e0 100644 --- a/nixpkgs_review/report.py +++ b/nixpkgs_review/report.py @@ -55,7 +55,8 @@ def write_error_logs(attrs: list[Attr], directory: Path) -> None: results = LazyDirectory(directory.joinpath("results")) failed_results = LazyDirectory(directory.joinpath("failed_results")) for attr in attrs: - if attr.blacklisted: + # Broken attrs have no drv_path. + if attr.blacklisted or attr.drv_path is None: continue if attr.path is not None and os.path.exists(attr.path):