Commit 92b8b990 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

presubmit: Update pydoc for AffectedFile.LocalPath()

To mention that it should not be used for accessing files.

Change-Id: I01ea79134bfc1f394c1791d47eb6fdb798358941
Reviewed-on: https://chromium-review.googlesource.com/750646Reviewed-by: 's avatarPaweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
parent 4810aa70
...@@ -685,6 +685,10 @@ class AffectedFile(object): ...@@ -685,6 +685,10 @@ class AffectedFile(object):
def LocalPath(self): def LocalPath(self):
"""Returns the path of this file on the local disk relative to client root. """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) return normpath(self._path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment