|
47 | 47 | ConsensusDocEvent, NewRevisionDocEvent, TelechatDocEvent, WriteupDocEvent, |
48 | 48 | IESG_BALLOT_ACTIVE_STATES, STATUSCHANGE_RELATIONS ) |
49 | 49 | from ietf.doc.utils import ( add_links_in_new_revision_events, augment_events_with_revision, |
50 | | - can_adopt_draft, get_chartering_type, get_document_content, get_tags_for_stream_id, |
| 50 | + can_adopt_draft, get_chartering_type, get_tags_for_stream_id, |
51 | 51 | needed_ballot_positions, nice_consensus, prettify_std_name, update_telechat, has_same_ballot, |
52 | 52 | get_initial_notify, make_notify_changed_event, make_rev_history, default_consensus, |
53 | 53 | add_events_message_info, get_unicode_document_content, build_doc_meta_block) |
|
66 | 66 | from ietf.review.models import ReviewRequest |
67 | 67 | from ietf.review.utils import can_request_review_of_doc, review_requests_to_list_for_docs |
68 | 68 | from ietf.review.utils import no_review_from_teams_on_doc |
69 | | -from ietf.utils import markup_txt, log |
| 69 | +from ietf.utils import markup_txt |
70 | 70 | from ietf.utils.text import maybe_split |
71 | 71 |
|
72 | 72 |
|
@@ -185,15 +185,7 @@ def document_main(request, name, rev=None): |
185 | 185 |
|
186 | 186 | if doc.get_state_slug() == "rfc": |
187 | 187 | # content |
188 | | - filename = name + ".txt" |
189 | | - |
190 | | - content = get_document_content(filename, os.path.join(settings.RFC_PATH, filename), |
191 | | - split_content, markup=True) |
192 | | - utext = doc.text_or_error() # pyflakes:ignore |
193 | | - if content and content != utext and not 'Error; cannot read' in content: |
194 | | - debug.show('content[:64]') |
195 | | - debug.show('utext[:64]') |
196 | | - log.assertion('content == utext') |
| 188 | + content = doc.text_or_error() # pyflakes:ignore |
197 | 189 | content = markup_txt.markup(maybe_split(content, split=split_content)) |
198 | 190 |
|
199 | 191 | # file types |
@@ -221,15 +213,7 @@ def document_main(request, name, rev=None): |
221 | 213 | content = "This RFC is not available in plain text format." |
222 | 214 | split_content = False |
223 | 215 | else: |
224 | | - filename = "%s-%s.txt" % (draft_name, doc.rev) |
225 | | - |
226 | | - content = get_document_content(filename, os.path.join(settings.INTERNET_ALL_DRAFTS_ARCHIVE_DIR, filename), |
227 | | - split_content, markup=True) |
228 | | - utext = doc.text_or_error() # pyflakes:ignore |
229 | | - if content and content != utext and not 'Error; cannot read' in content: |
230 | | - debug.show('content[:64]') |
231 | | - debug.show('utext[:64]') |
232 | | - log.assertion('content == utext') |
| 216 | + content = doc.text_or_error() # pyflakes:ignore |
233 | 217 | content = markup_txt.markup(maybe_split(content, split=split_content)) |
234 | 218 |
|
235 | 219 | # file types |
@@ -451,14 +435,7 @@ def document_main(request, name, rev=None): |
451 | 435 | )) |
452 | 436 |
|
453 | 437 | if doc.type_id == "charter": |
454 | | - filename = "%s-%s.txt" % (doc.canonical_name(), doc.rev) |
455 | | - |
456 | | - content = get_document_content(filename, os.path.join(settings.CHARTER_PATH, filename), split=False, markup=True) |
457 | | - utext = doc.text_or_error() # pyflakes:ignore |
458 | | - if content and content != utext and not 'Error; cannot read' in content: |
459 | | - debug.show('content[:64]') |
460 | | - debug.show('utext[:64]') |
461 | | - log.assertion('content == utext') |
| 438 | + content = doc.text_or_error() # pyflakes:ignore |
462 | 439 | content = markup_txt.markup(content) |
463 | 440 |
|
464 | 441 | ballot_summary = None |
@@ -502,12 +479,7 @@ def document_main(request, name, rev=None): |
502 | 479 | # This could move to a template |
503 | 480 | content = u"A conflict review response has not yet been proposed." |
504 | 481 | else: |
505 | | - content = get_document_content(filename, pathname, split=False, markup=True) |
506 | | - utext = doc.text_or_error() # pyflakes:ignore |
507 | | - if content and content != utext and not 'Error; cannot read' in content: |
508 | | - debug.show('content[:64]') |
509 | | - debug.show('utext[:64]') |
510 | | - log.assertion('content == utext') |
| 482 | + content = doc.text_or_error() # pyflakes:ignore |
511 | 483 | content = markup_txt.markup(content) |
512 | 484 |
|
513 | 485 | ballot_summary = None |
@@ -535,12 +507,7 @@ def document_main(request, name, rev=None): |
535 | 507 | # This could move to a template |
536 | 508 | content = u"Status change text has not yet been proposed." |
537 | 509 | else: |
538 | | - content = get_document_content(filename, pathname, split=False) |
539 | | - utext = doc.text_or_error() # pyflakes:ignore |
540 | | - if content and content != utext and not 'Error; cannot read' in content: |
541 | | - debug.show('content[:64]') |
542 | | - debug.show('utext[:64]') |
543 | | - log.assertion('content == utext') |
| 510 | + content = doc.text_or_error() # pyflakes:ignore |
544 | 511 |
|
545 | 512 | ballot_summary = None |
546 | 513 | if doc.get_state_slug() in ("iesgeval"): |
@@ -593,12 +560,7 @@ def document_main(request, name, rev=None): |
593 | 560 | url = urlbase + extension |
594 | 561 |
|
595 | 562 | if extension == ".txt": |
596 | | - content = get_document_content(basename, pathname + extension, split=False) |
597 | | - utext = doc.text_or_error() # pyflakes:ignore |
598 | | - if content != utext: |
599 | | - debug.show('content[:64]') |
600 | | - debug.show('utext[:64]') |
601 | | - log.assertion('content == utext') |
| 563 | + content = doc.text_or_error() # pyflakes:ignore |
602 | 564 | t = "plain text" |
603 | 565 |
|
604 | 566 | other_types.append((t, url)) |
|
0 commit comments