- # try:
- lesson.republish(repackage_level=False)
- # except BaseException as e:
- # print '!!!!!! EXCEPTION !!!!!!'
- # print e
-
- print 'Rebuilding levels...'
- for level in Level.objects.all():
- level.build_packages()
+ try:
+ lesson.republish(repackage_level=False)
+ except librarian.ParseError as e:
+ print '!!!!!! PARSE ERROR !!!!!!'
+ print e
+
+ if options.get('repackage'):
+ print 'Rebuilding levels...'
+ for level in Level.objects.all():
+ print level.name
+ level.build_packages()