launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24218
Re: [Merge] ~pappacena/launchpad:fix-encoding-css-combine into launchpad:master
Diff comments:
> diff --git a/lib/lp/scripts/utilities/js/combinecss.py b/lib/lp/scripts/utilities/js/combinecss.py
> index 1aa1072..1bb94c2 100755
> --- a/lib/lp/scripts/utilities/js/combinecss.py
> +++ b/lib/lp/scripts/utilities/js/combinecss.py
> @@ -75,9 +75,9 @@ def main():
>
> combo = ComboFile(absolute_names, target)
> if combo.needs_update():
> - result = ''
> + result = u''
> for content in combine_files(names, icing):
> - result += content
> + result += content.decode('utf8')
>
> with open(target, 'w') as f:
> - f.write(result)
> + f.write(result.encode('utf8'))
But without the proper encoding on writing, python2 would write unicode to the file and this could write the wrong non-ascii caracter, isn't it?
It's probably not a big deal in this case, since it's bundling together CSS files (and I doubt the non-ascii character is some identifier or anything like that). Just to make sure I got the point here.
--
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/377331
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/launchpad:fix-encoding-css-combine into launchpad:master.
References