[Webkit-unassigned] [Bug 49122] webkitpy/tool/* unittests change cwd and don't clean up properly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 5 23:20:19 PDT 2010


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


Eric Seidel <eric at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mihaip at chromium.org




--- Comment #5 from Eric Seidel <eric at webkit.org>  2010-11-05 23:20:18 PST ---
http://docs.python.org/library/sys.html#sys.path

"As initialized upon program startup, the first item of this list, path[0], is the directory containing the script that was used to invoke the Python interpreter. If the script directory is not available (e.g. if the interpreter is invoked interactively or if the script is read from standard input), path[0] is the empty string, which directs Python to search modules in the current directory first. Notice that the script directory is inserted before the entries inserted as a result of PYTHONPATH."

It seems changing to __file__ here is safe since assuming path[0] is a valid directory from which the python interpreter was invoked sounds like it will break.

If we're invoking webkit-patch inside another checkout the previous detect_scm_system(cwd) will have already succeeded, so __file__ seems fine.

Sorry you had to run down this goose.

I think we'll need to consider some of the other fixes you mention as well for future patches.

-- 
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