fnp
/
edumed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d15d52d
)
catch latex errors on republish
author
Jan Szejko
<janek37@gmail.com>
Wed, 25 Jan 2017 16:31:01 +0000
(17:31 +0100)
committer
Jan Szejko
<janek37@gmail.com>
Wed, 25 Jan 2017 16:31:01 +0000
(17:31 +0100)
catalogue/management/commands/republish.py
patch
|
blob
|
history
diff --git
a/catalogue/management/commands/republish.py
b/catalogue/management/commands/republish.py
index
3ed17d1
..
941458f
100644
(file)
--- a/
catalogue/management/commands/republish.py
+++ b/
catalogue/management/commands/republish.py
@@
-4,6
+4,7
@@
#
from optparse import make_option
#
from optparse import make_option
+import librarian
from django.core.management.base import BaseCommand
from django.core.management.base import BaseCommand
@@
-32,11
+33,11
@@
class Command(BaseCommand):
for lesson in lessons:
print
print 'Republishing: %s' % lesson.slug
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 'Rebuilding levels...'
for level in Level.objects.all():