Fix bug in singleCheckErrors (#71706)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71706
This fixes a bug in singleCheckErrors introduced by #69437 (thanks
Lezcano for the catch). Checking existence of a substring in a larger
string is done with (name.find(text) != name.npos) but we omitted the
second half of the check.
Test Plan: - Code reading; I guess there are no tests for this in CI
Reviewed By: mikaylagawarecki
Differential Revision: D33742822
Pulled By: zou3519
fbshipit-source-id: a12017bb12b941282704bd2110e8632f02c24b04
(cherry picked from commit afb5a04a44232671961d554139e5e19ee711fcab)