I find it troubling that we now have contributors that don't follow #1 in https://www.mercurial-scm.org/wiki/ContributingChanges#Submission_checklist. Potentially #4 too (as Pulkit commented).
Seriously, the title is terrible at describing what this patch fixes and where. The commit message could briefly mention why/when this condition is even required.
This is some... interesting syntax. Is this valid Python?
Okay, let's go over #1 in https://www.mercurial-scm.org/wiki/ContributingChanges#Submission_checklist once more. If you want to know what a good "topic" is, look at what other people do. How patches that get accepted generally look. How bug-fixing commits are worded.
Secondly, about that capitalization. I'm sorry if this is some sort of silly autocorrect that's doing it for you, I really hope you're not writing commit messages on a phone.
None > 1 is still an issue, see my comment above.