Skip to content

Commit fc921ec

Browse files
committed
Fix crash if the charter text file isn't found.
- Legacy-Id: 4206
1 parent 70b1271 commit fc921ec

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ietf/idrfc/views_doc.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,11 @@ def _get_html(key, filename, split=True):
271271
f = open(filename, 'rb')
272272
raw_content = f.read()
273273
except IOError:
274-
return ("Error; cannot read ("+key+")", "")
274+
error = "Error; cannot read ("+key+")"
275+
if split:
276+
return (error, "")
277+
else:
278+
return error
275279
finally:
276280
if f:
277281
f.close()

0 commit comments

Comments
 (0)