> On 21 Jul 2024, at 10:22, Paul Howarth <p...@city-fan.org> wrote:
> 
> Hence the check is:
> 
>    except UnsupportedAlgorithm as e:
>        return e._reason is _Reasons.UNSUPPORTED_HASH

This may be a case of the e._reason being the correct int value of _ 
Reasons.UNSUPPORTED_HASH by not the singleton.
So “is” fails but when == coerces to int it is True.

You would need to print out both values to see if this is the case.

I would have coded == in this case. I am curious
where you read that “is” is recommended?

Barry


-- 
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to