Code review comment for lp:~andreserl/maas/lp1570609

Revision history for this message
Mike Pontillo (mpontillo) wrote :

Looks good, though I do have a minor nit. I would suggest changing this line instead:

        xmldecl = re.compile(b'<[?]xml\\s')

to:

        xmldecl = re.compile('<[?]xml\\s')

Reasoning: there is no need to encode the XML string into bytes if you can just compare it to a string using the regex. (In other words, the .encode() is doing a small amount of unnecessary extra work.)

review: Approve

« Back to merge proposal