Show More
@@ -467,9 +467,8 b' def mimeencode(ui, s, charsets=None, dis' | |||
|
467 | 467 | return mimetextqp(s, 'plain', cs) |
|
468 | 468 | |
|
469 | 469 | |
|
470 | if pycompat.ispy3: | |
|
470 | Generator = email.generator.BytesGenerator | |
|
471 | 471 | |
|
472 | Generator = email.generator.BytesGenerator | |
|
473 | 472 | |
|
474 | 473 |
|
|
475 | 474 |
|
@@ -485,27 +484,13 b' if pycompat.ispy3:' | |||
|
485 | 484 |
|
|
486 | 485 |
|
|
487 | 486 | |
|
487 | ||
|
488 | 488 |
|
|
489 | 489 |
|
|
490 | 490 |
|
|
491 | 491 |
|
|
492 | 492 | |
|
493 | 493 | |
|
494 | else: | |
|
495 | ||
|
496 | Generator = email.generator.Generator | |
|
497 | ||
|
498 | def parse(fp): | |
|
499 | # type: (Any) -> email.message.Message | |
|
500 | ep = email.parser.Parser() | |
|
501 | return ep.parse(fp) | |
|
502 | ||
|
503 | def parsebytes(data): | |
|
504 | # type: (str) -> email.message.Message | |
|
505 | ep = email.parser.Parser() | |
|
506 | return ep.parsestr(data) | |
|
507 | ||
|
508 | ||
|
509 | 494 | def headdecode(s): |
|
510 | 495 | # type: (Union[email.header.Header, bytes]) -> bytes |
|
511 | 496 | '''Decodes RFC-2047 header''' |
General Comments 0
You need to be logged in to leave comments.
Login now