From 9f2564b80c3c6e81cb28c1e93f9237df0a65fb53 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 29 Mar 2023 07:03:23 -0300 Subject: [PATCH] [Diff][Fixed] Problems when using an output and no variant specified --- CHANGELOG.md | 2 ++ kibot/out_diff.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcb8cfd1..179a87e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - PCB Print: - Interference between the visible layers in the PRL file and the results when scaling. (#407) +- Diff: + - Problems when using an output and no variant specified. ## [1.6.1] - 2023-03-16 diff --git a/kibot/out_diff.py b/kibot/out_diff.py index bbd24e5b..bb1527da 100644 --- a/kibot/out_diff.py +++ b/kibot/out_diff.py @@ -390,7 +390,11 @@ class DiffOptions(BaseOptions): if not out._done: run_output(out) res = self.cache_file(fname) - self.git_hash = out.options.variant.file_id if self.use_file_id else out.options.variant.name+'_variant' + variant = out.options.variant + if variant is None: + self.git_hash = 'no_variant' + else: + self.git_hash = variant.file_id if self.use_file_id else variant.name+'_variant' return res def cache_current(self):