self.script.append(
'apply_patch_check("%s"' % (filename,) +
"".join([', "%s"' % (i,) for i in sha1]) +
- ') || abort("\\"%s\\" has unexpected contents.");' % (filename,))
+ ') || abort("E%d: \\"%s\\" has unexpected contents.");' % (
+ common.ErrorCode.BAD_PATCH_FILE, filename))
def Verify(self, filename):
- """Check that the given file (or MTD reference) has one of the
+ """Check that the given file has one of the
given hashes (encoded in the filename)."""
self.script.append(
'apply_patch_check("{filename}") && '