Tweaked agenda presentation in order to not blow up on bad character encodings in charter file.

- Legacy-Id: 5938
This commit is contained in:
Henrik Levkowetz 2013-08-01 14:35:19 +00:00
parent 8675711c27
commit 582be932d1

View file

@ -711,11 +711,10 @@ def charter_with_milestones_txt(request, name, rev):
try:
with open(os.path.join(settings.CHARTER_PATH, filename), 'r') as f:
charter_text = f.read()
charter_text = unicode(f.read(), errors='ignore')
except IOError:
charter_text = "Error reading charter text %s" % filename
milestones = historic_milestones_for_charter(charter, rev)
# wrap the output nicely