Fix py38 ut

Change-Id: Ic02f32ec9d886a07d633c4512d0e55d996f76177
Closes-Bug: #1885431
This commit is contained in:
zhurong 2020-07-08 16:13:39 +08:00
parent c7637a7197
commit 27f82cb429
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ class Report(object):
kwargs['source'] = meta.get_snippet()
kwargs['filename'] = filename or meta.name
return CheckError(code=code, message=message, **kwargs)
if code not in self.errors:
if not code.startswith('_') and code not in self.errors:
raise ValueError('Error {} was not registered'.format(code))
return _report