[Webkit-unassigned] [Bug 46892] webkitpy.common.system.executive_unittest.ExecutiveTest.test_run_command_with_unicode fails on Windows

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 30 10:47:02 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=46892





--- Comment #4 from Eric Seidel <eric at webkit.org>  2010-09-30 10:47:02 PST ---
Looks like we'll need to encode the args for windows.

See:

        args = map(unicode, args)  # Popen will throw an exception if args are non-strings (like int())
in POpen.run_command

I don't know what encoding cygwin would want things passed to it on the command line, but utf8 sounds like a good try.

Just add an if block after that line which is:

# cygwin's os.execv in YOUR_PYTHON_VERSION doesn't seem to like unicode strings.
if sys.platform == "cygwin":
    args = [arg.encode("utf8") for arg in args]


If this is version specific, we'll need to add a version check there too.

I've long thought we should consider making a POpen subclass which we use everywhere to do fixups like this.  Maybe now is the time.  Popen.__init__ should be able to take unicode strings.  It has to for python 3.0 for sure!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list