• Bruce Dawson's avatar
    Ensure _PresubmitResult._message is text · db8622bc
    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: 's avatarJochen Eisinger <jochen@chromium.org>
    Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
    db8622bc
Name
Last commit
Last update
..
gstools Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
auth_test.py Loading commit data...
bot_update_coverage_test.py Loading commit data...
cipd_bootstrap_test.py Loading commit data...
detect_host_arch_test.py Loading commit data...
download_from_google_storage_unittest.py Loading commit data...
fetch_test.py Loading commit data...
fix_encoding_test.py Loading commit data...
gclient_cipd_smoketest.py Loading commit data...
gclient_eval_unittest.py Loading commit data...
gclient_git_mutates_smoketest.py Loading commit data...
gclient_git_smoketest.py Loading commit data...
gclient_paths_test.py Loading commit data...
gclient_scm_test.py Loading commit data...
gclient_smoketest.py Loading commit data...
gclient_smoketest_base.py Loading commit data...
gclient_test.py Loading commit data...
gclient_transitions_smoketest.py Loading commit data...
gclient_utils_test.py Loading commit data...
gerrit_client_test.py Loading commit data...
gerrit_util_test.py Loading commit data...
git_cache_test.py Loading commit data...
git_cl_creds_check_report.txt Loading commit data...
git_cl_test.py Loading commit data...
git_common_test.py Loading commit data...
git_dates_test.py Loading commit data...
git_find_releases_test.py Loading commit data...
git_footers_test.py Loading commit data...
git_hyper_blame_test.py Loading commit data...
git_map_test.py Loading commit data...
git_migrate_default_branch_test.py Loading commit data...
git_number_test.py Loading commit data...
git_rebase_update_test.py Loading commit data...
gsutil_test.py Loading commit data...
lockfile_test.py Loading commit data...
metrics_test.py Loading commit data...
my_activity_test.py Loading commit data...
ninjalog_uploader_test.py Loading commit data...
owners_client_test.py Loading commit data...
owners_finder_test.py Loading commit data...
owners_unittest.py Loading commit data...
presubmit_unittest.py Loading commit data...
rdb_wrapper_test.py Loading commit data...
recipes_test.py Loading commit data...
roll_dep_test.py Loading commit data...
scm_unittest.py Loading commit data...
split_cl_test.py Loading commit data...
subcommand_test.py Loading commit data...
subprocess2_test.py Loading commit data...
upload_to_google_storage_unittest.py Loading commit data...
utils_test.py Loading commit data...
watchlists_unittest.py Loading commit data...