From 423805cce65d77c377482c03a697044a6b1a5628 Mon Sep 17 00:00:00 2001 From: Jacob Babor Date: Fri, 24 Jan 2025 16:24:29 -0600 Subject: [PATCH] More work on the tagger thing --- odyseescraper/management/commands/odyseetag.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/odyseescraper/management/commands/odyseetag.py b/odyseescraper/management/commands/odyseetag.py index aeb3830..02b4469 100644 --- a/odyseescraper/management/commands/odyseetag.py +++ b/odyseescraper/management/commands/odyseetag.py @@ -26,15 +26,15 @@ class Command(BaseCommand): if taggingrule.tag in release.tags.all(): ignores += 1 continue - print('Would tag') + self.stdout.write(f'Release "{str(release)}" matched rule "{str(taggingrule)}" - applied tag "{str(taggingrule.tag)}"') updates += 1 except Exception as e: self.stdout.write(self.style.WARNING(f'Failed to apply rule {str(taggingrule.name)}: {e}')) - failures.append({"release": str(release),"error":e}) + failures.append({"release": str(release),"rule": taggingrule.name,"error":e}) if failures: self.stdout.write(self.style.ERROR('Errors occurred while tagging:')) for error in failures: - self.stdout.write(self.style.ERROR(f'{error["release"]} - {error["error"]}')) + self.stdout.write(self.style.ERROR(f'{error["rule"]} - {error["release"]} - {error["error"]}')) if updates > 0: self.stdout.write(self.style.WARNING(f'Applied {updates} tags despite this, {ignores} already satisfied')) else: