Product: Fedora
https://bugzilla.redhat.com/show_bug.cgi?id=920778

Bohuslav "Slavek" Kabrda <bkab...@redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |fedora-review+

--- Comment #6 from Bohuslav "Slavek" Kabrda <bkab...@redhat.com> ---
The newlines are actually a correct behaviour. In Python 3, the read() method
of the opener object returns 'bytes' object. This is because it can't determine
the encoding of the URL content prior to reading it.
When you print a 'bytes' object in Python 3, this is exactly what happens. As
mentioned in [1], it is up to your program to determine the encoding from the
'bytes' object and then decode it properly into string. Therefore, if you use

print(opener.open(validatorURL, params).read().decode('utf-8'))

everything will work as you expect and it is also actually the "correct"
behaviour, so to say.

[1] http://docs.python.org/3/library/urllib.request.html#examples

Anyway, the specfile and SRPM look good, so please fix this nit before
importing, the package is


APPROVED

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug 
https://bugzilla.redhat.com/token.cgi?t=utBMPGoiwQ&a=cc_unsubscribe
_______________________________________________
package-review mailing list
package-review@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/package-review

Reply via email to