Code review comment for lp:~zyga/launchpadlib/fix-1471927

Revision history for this message
Colin Watson (cjwatson) wrote :

You say that this is ensuring that it's not unicode on Python 2, but if you pass unicode in then it will try to decode it and (depending on the contents) either crash or leave it as unicode. Either way it's a bit inconsistent with the comment.

I haven't looked at the context further down, but can you just decode if it's bytes and drop the not str condition? You'll get unicode on Python 2, but it should tolerate that fine here; and it would be simpler code requiring a simpler comment (or probably none at all).

review: Needs Fixing

« Back to merge proposal