@@ -256,7 +256,7 @@ static Object hmacDigest(VirtualFrame frame, PythonModule self, Object key, Obje
256
256
@ Cached PRaiseNode .Lazy raiseNode ) {
257
257
if (msg instanceof PNone ) {
258
258
// hmac_digest is a bit more strict
259
- throw raiseNode .get (inliningTarget ).raise (PythonBuiltinClassType .TypeError , ErrorMessages .A_BYTES_LIKE_OBJECT_IS_REQUIRED_NOT_P , msg );
259
+ throw raiseNode .get (inliningTarget ).raise (PythonBuiltinClassType .TypeError , ErrorMessages .BYTESLIKE_OBJ_REQUIRED , msg );
260
260
}
261
261
Object hmacObject = newNode .execute (frame , self , key , msg , digest );
262
262
return digestNode .execute (frame , hmacObject );
@@ -311,7 +311,7 @@ static Object hmacNew(@SuppressWarnings("unused") PythonModule self, Object keyO
311
311
TruffleString digestmod = castStr .execute (inliningTarget , digestmodObj );
312
312
Object key ;
313
313
if (!acquireLib .hasBuffer (keyObj )) {
314
- throw raiseNode .get (inliningTarget ).raise (PythonBuiltinClassType .TypeError , ErrorMessages .A_BYTES_LIKE_OBJECT_IS_REQUIRED_NOT_P , keyObj );
314
+ throw raiseNode .get (inliningTarget ).raise (PythonBuiltinClassType .TypeError , ErrorMessages .BYTESLIKE_OBJ_REQUIRED , keyObj );
315
315
} else {
316
316
key = acquireLib .acquireReadonly (keyObj );
317
317
}
@@ -322,7 +322,7 @@ static Object hmacNew(@SuppressWarnings("unused") PythonModule self, Object keyO
322
322
} else if (acquireLib .hasBuffer (msgObj )) {
323
323
msg = acquireLib .acquireReadonly (msgObj );
324
324
} else {
325
- throw raiseNode .get (inliningTarget ).raise (PythonBuiltinClassType .TypeError , ErrorMessages .A_BYTES_LIKE_OBJECT_IS_REQUIRED_NOT_P , msgObj );
325
+ throw raiseNode .get (inliningTarget ).raise (PythonBuiltinClassType .TypeError , ErrorMessages .BYTESLIKE_OBJ_REQUIRED , msgObj );
326
326
}
327
327
try {
328
328
byte [] msgBytes = msg == null ? null : bufferLib .getInternalOrCopiedByteArray (msg );
@@ -374,7 +374,7 @@ static Object doIt(VirtualFrame frame, Node inliningTarget, PythonBuiltinClassTy
374
374
} else if (acquireLib .hasBuffer (value )) {
375
375
buffer = acquireLib .acquireReadonly (value , frame , indirectCallData );
376
376
} else {
377
- throw raise .get (inliningTarget ).raise (PythonBuiltinClassType .TypeError , ErrorMessages .A_BYTES_LIKE_OBJECT_IS_REQUIRED_NOT_P , value );
377
+ throw raise .get (inliningTarget ).raise (PythonBuiltinClassType .TypeError , ErrorMessages .BYTESLIKE_OBJ_REQUIRED , value );
378
378
}
379
379
try {
380
380
byte [] bytes = buffer == null ? null : bufferLib .getInternalOrCopiedByteArray (buffer );
0 commit comments