From ddfe3199d05b8a8cbbcbc4b32b1831be6d42a073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 12 Sep 2022 15:41:03 +0200 Subject: [PATCH] Add-on: report which files were missing After submission, list the missing files on the terminal (if there are any). --- CHANGELOG.md | 1 + addon/flamenco/bat/interface.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26e721be..257641ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ bugs in actually-released versions. ## 3.0 - in development - Faster & more accurate progress reporting of file submission. +- Add-on: report which files were missing after submitting a job. This is reported in the terminal (aka System Console). ## 3.0-beta3 - released 2022-08-31 diff --git a/addon/flamenco/bat/interface.py b/addon/flamenco/bat/interface.py index 07b50880..f716b258 100644 --- a/addon/flamenco/bat/interface.py +++ b/addon/flamenco/bat/interface.py @@ -85,6 +85,7 @@ class BatProgress(submodules.progress.Callback): # type: ignore ) -> None: if missing_files: self._txt("There were %d missing files" % len(missing_files)) + self._log_missing_files(missing_files) else: self._txt("Pack of %s done" % output_blendfile.name) @@ -117,6 +118,11 @@ class BatProgress(submodules.progress.Callback): # type: ignore # TODO(Sybren): report missing files in a nice way pass + def _log_missing_files(self, missing_files: typing.Set[Path]) -> None: + print("Missing files:") + for path in sorted(missing_files): + print(f" - {path}") + class PackThread(threading.Thread): queue: queue.SimpleQueue[Message]