Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

Commit f289a75

Browse files
authored
Use PyErr_SetObject instead of PyErr_Format for NonUniqueError
2 parents 7074d9f + 8c29751 commit f289a75

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

automap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ insert(FAMObject *self, PyObject *key, Py_ssize_t offset, Py_hash_t hash)
503503
return -1;
504504
}
505505
if (self->table[index].hash != -1) {
506-
PyErr_Format(NonUniqueError, "Non-unique value found: %R", key);
506+
PyErr_SetObject(NonUniqueError, key);
507507
return -1;
508508
}
509509
self->table[index].index = offset;

0 commit comments

Comments
 (0)