-
Bruce Dawson authored
It is easy to get type confusion and end up passing a list as the message parameter to _PresubmitResult. This error will not be detected until the end of the run - perhaps hours later - when all evidence of where the list came from is lost. This change ensures that the message parameter is a string. If it is not then the exception that is thrown should allow quick identification of the problematic code. This also fixes a presubmit unit test that passed None as the message. We could support that but I don't think that we should. Bug: 1309977 Change-Id: Ifb1d5100d47922b0ebd8bb834caa6fbba690b43c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3566436Reviewed-by: Jochen Eisinger <jochen@chromium.org> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
db8622bc