Changed agenda file reading to read files as binary when looking for draft names listed in the agenda.
- Legacy-Id: 16505
This commit is contained in:
parent
8d2d732210
commit
6ef24e9c4e
|
@ -216,7 +216,7 @@ def read_session_file(type, num, doc):
|
|||
# FIXME: uploaded_filename should be replaced with a function call that computes names that are fixed
|
||||
path = os.path.join(settings.AGENDA_PATH, "%s/%s/%s" % (num, type, doc.uploaded_filename))
|
||||
if os.path.exists(path):
|
||||
with io.open(path) as f:
|
||||
with io.open(path, 'rb') as f:
|
||||
return f.read(), path
|
||||
else:
|
||||
return None, path
|
||||
|
|
|
@ -656,7 +656,7 @@ def session_draft_list(num, acronym):
|
|||
for agenda in agendas:
|
||||
content, _ = read_agenda_file(num, agenda)
|
||||
if content:
|
||||
drafts.update(re.findall('(draft-[-a-z0-9]*)', content))
|
||||
drafts.update(re.findall(b'(draft-[-a-z0-9]*)', content))
|
||||
|
||||
result = []
|
||||
for draft in drafts:
|
||||
|
|
Loading…
Reference in a new issue