From 92b8b99069f423153ed314254fbfb9363893049b Mon Sep 17 00:00:00 2001 From: Andrew Grieve Date: Thu, 2 Nov 2017 09:42:24 -0400 Subject: [PATCH] presubmit: Update pydoc for AffectedFile.LocalPath() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To mention that it should not be used for accessing files. Change-Id: I01ea79134bfc1f394c1791d47eb6fdb798358941 Reviewed-on: https://chromium-review.googlesource.com/750646 Reviewed-by: Paweł Hajdan Jr. Commit-Queue: agrieve --- presubmit_support.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/presubmit_support.py b/presubmit_support.py index a082cfd24..08bf5ac1a 100755 --- a/presubmit_support.py +++ b/presubmit_support.py @@ -685,6 +685,10 @@ class AffectedFile(object): def LocalPath(self): """Returns the path of this file on the local disk relative to client root. + + This should be used for error messages but not for accessing files, + because presubmit checks are run with CWD=PresubmitLocalPath() (which is + often != client root). """ return normpath(self._path)