On 4/30/25 8:03 PM, Edward Cree wrote:
> On 29/04/2025 18:08, Jakub Kicinski wrote:
>> +class KsftTerminate(KeyboardInterrupt):
>> +    pass
> ...
>> @@ -229,11 +249,12 @@ KSFT_DISRUPTIVE = True
>>              cnt_key = 'xfail'
>>          except BaseException as e:
>>              stop |= isinstance(e, KeyboardInterrupt)
>> +            stop |= isinstance(e, KsftTerminate)
> 
> The first isinstance() will return True for a KsftTerminate as it's a
>  subclass of KeyboardInterrupt, and thus the second line isn't needed.

@Jakub: I'm using the selftests code to refresh my rather rusty python
skills, I think it would be good to address the above and keep the
codebase clean.

Thanks,

Paolo


Reply via email to