X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/bcebd10994f5e22f23bb6d2dc7cd4c7889dbdbfe..b1e1600ec1a45327a4bb2e0a1104a17ec5f9a187:/catalogue/management/commands/republish.py?ds=inline diff --git a/catalogue/management/commands/republish.py b/catalogue/management/commands/republish.py index 3ed17d1..12ee480 100644 --- a/catalogue/management/commands/republish.py +++ b/catalogue/management/commands/republish.py @@ -4,6 +4,7 @@ # from optparse import make_option +import librarian from django.core.management.base import BaseCommand @@ -32,12 +33,13 @@ class Command(BaseCommand): for lesson in lessons: print print 'Republishing: %s' % lesson.slug - # try: - lesson.republish(repackage_level=False) - # except BaseException as e: - # print '!!!!!! EXCEPTION !!!!!!' - # print e + try: + lesson.republish(repackage_level=False) + except librarian.ParseError as e: + print '!!!!!! PARSE ERROR !!!!!!' + print e print 'Rebuilding levels...' for level in Level.objects.all(): + print level.name level.build_packages()