Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
# essential sanity checks, do not start temboz if these fail
import sys, os.path, pprint, feedparser, bleach
import tembozapp.normalize as normalize
bugfeed = (os.path.dirname(__file__) or '.') + os.sep + 'bugfeed'
#print(__file__, bugfeed)
calmatters = open(bugfeed + os.sep + 'calmatters')
text =
#import pdb
f = feedparser.parse(text)
for i in f.entries:
normalize.normalize(i, f, False)
assert '<script>' not in repr(i), \
'Refusing to start Temboz because feedparser is not sanitizing properly'
assert bleach.__version__ >= '5', \
'Temboz now requires Bleach 5 or later, which made breaking API changes'