lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andi Vajda <va...@apache.org>
Subject Re: Errors when running "make test"
Date Sun, 27 Jan 2019 22:06:56 GMT


On Sun, 27 Jan 2019, marco turchi wrote:

> Dear Andi,
> thanks a lot! I will have a look at the configuration of the drivers.
>
>
>> This code needs to be fixed for Python 3.
>> How is the name of an exception class extracted in Python 3 ?
>> The exception class cannot be used directly since WindowsError exists only
>> on Windows, making the code using the exception class unportable.
>>
>>

Oh, it looks like this code is just missing 'type()', it should say:
   if type(e).__name__ == 'WindowsError'

Andi..

> According to your question, I guess the generic exception class that
> includes all the built-in exceptions is BaseException. See here for
> more details:
> https://docs.python.org/3/library/exceptions.html#bltin-exceptions
>
> Thanks a lot!
> Marco
>

Mime
View raw message