launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25958
Re: [Merge] ~cjwatson/launchpad:py3-filebugdataparser into launchpad:master
Diff comments:
> diff --git a/lib/lp/bugs/utilities/filebugdataparser.py b/lib/lp/bugs/utilities/filebugdataparser.py
> index ce16707..3b320be 100644
> --- a/lib/lp/bugs/utilities/filebugdataparser.py
> +++ b/lib/lp/bugs/utilities/filebugdataparser.py
> @@ -123,8 +124,8 @@ class FileBugDataParser:
> line = self.readLine()
> while not line.startswith(boundary):
> # Decode the file.
> - if content_encoding is not None:
> - line = line.decode(content_encoding)
> + if content_encoding == 'base64':
> + line = base64.b64decode(line)
It's not obvious why this is OK just from this diff, but a few lines above there's this assertion:
if content_encoding is not None and content_encoding != 'base64':
raise AssertionError(
"Unknown encoding: %r." % content_encoding)
> part_file.write(line)
> line = self.readLine()
> # Prepare the file for reading.
--
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/395937
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-filebugdataparser into launchpad:master.
References