Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra authored Sep 30, 2024
1 parent bd71f6e commit c2ae6e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -2546,9 +2546,11 @@ compiler_class_body(struct compiler *c, stmt_ty s, int firstlineno)
assert(c->u->u_static_attributes);
PyObject *static_attributes_unsorted = PySequence_List(c->u->u_static_attributes);
if (static_attributes_unsorted == NULL) {
compiler_exit_scope(c);
return ERROR;
}
if (PyList_Sort(static_attributes_unsorted) != 0) {
compiler_exit_scope(c);
Py_DECREF(static_attributes_unsorted);
return ERROR;
}
Expand Down

0 comments on commit c2ae6e3

Please sign in to comment.