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: