clearer info in checkintegrity
authorJan Szejko <janek37@gmail.com>
Thu, 22 Feb 2018 09:16:58 +0000 (10:16 +0100)
committerJan Szejko <janek37@gmail.com>
Thu, 22 Feb 2018 09:16:58 +0000 (10:16 +0100)
src/catalogue/management/commands/checkintegrity.py

index 6d8a955..6f090bb 100644 (file)
@@ -38,8 +38,10 @@ class Command(BaseCommand):
                     if should_be != is_now:
                         if verbose:
                             print "ERROR! Wrong children for book:", book.slug
-                            print "Is:       ", is_now
-                            print "Should be:", should_be
+                            # print "Is:       ", is_now
+                            # print "Should be:", should_be
+                            from difflib import ndiff
+                            print '\n'.join(ndiff(is_now, should_be))
                             print "To resolve: republish parent book."
                             print