Fixed some .format() calls.

- Legacy-Id: 16967
This commit is contained in:
Henrik Levkowetz 2019-11-05 22:38:54 +00:00
parent 5d8aa656a5
commit c565dca35b
2 changed files with 2 additions and 2 deletions

View file

@ -618,7 +618,7 @@ def document_main(request, name, rev=None):
if doc.type_id == "review":
basename = "{}.txt".format(doc.name, doc.rev)
basename = "{}.txt".format(doc.name)
pathname = os.path.join(doc.get_file_path(), basename)
content = get_unicode_document_content(basename, pathname)
# If we want to go back to using markup_txt.markup_unicode, call it explicitly here like this:

View file

@ -722,7 +722,7 @@ def complete_review(request, name, assignment_id=None, acronym=None):
else:
content = form.cleaned_data['review_content']
filename = os.path.join(review.get_file_path(), '{}.txt'.format(review.name, review.rev))
filename = os.path.join(review.get_file_path(), '{}.txt'.format(review.name))
with io.open(filename, 'w', encoding='utf-8') as destination:
destination.write(content)