The WebKit W3C importer tries to rewrite the xml/html/css files when importing them to rewrite paths and such. The issue is that to decide if rewrite the file or not uses the mimetype and the current code just checks for something like if "xml" in str(mimetype[0]) but svg files have mimetype image/svg+xml so the above becomes true and it tries to rewrite a svg file breaking it.
Created attachment 380658 [details] Patch
Comment on attachment 380658 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380658&action=review > Tools/Scripts/webkitpy/w3c/test_importer.py:514 > + _log.info("Rewriting: %s" % new_filepath) Can we use .format strings? % encoding doesn't work in Python 3
(In reply to Jonathan Bedard from comment #2) > Comment on attachment 380658 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=380658&action=review > > > Tools/Scripts/webkitpy/w3c/test_importer.py:514 > > + _log.info("Rewriting: %s" % new_filepath) > > Can we use .format strings? % encoding doesn't work in Python 3 I think it does work in python3 without issue. $ python3 -c 'var="world"; print("Hello %s" % var)' Hello world
(In reply to Carlos Alberto Lopez Perez from comment #3) > (In reply to Jonathan Bedard from comment #2) > > Comment on attachment 380658 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=380658&action=review > > > > > Tools/Scripts/webkitpy/w3c/test_importer.py:514 > > > + _log.info("Rewriting: %s" % new_filepath) > > > > Can we use .format strings? % encoding doesn't work in Python 3 > > I think it does work in python3 without issue. > > $ python3 -c 'var="world"; print("Hello %s" % var)' > Hello world You're totally right...not sure why I thought that didn't work in Python3.
Comment on attachment 380658 [details] Patch Clearing flags on attachment: 380658 Committed r250992: <https://trac.webkit.org/changeset/250992>
All reviewed patches have been landed. Closing bug.
<rdar://problem/56170891>