Looks like Python 3 files do not confirm to Python 3

Mark Lawrence breamoreboy at yahoo.co.uk
Fri May 1 04:05:27 EDT 2015


On 01/05/2015 08:16, Cecil Westerhof wrote:
> Op Friday 1 May 2015 08:27 CEST schreef Cecil Westerhof:
>
>> On my system in:
>> /usr/lib/python3.4/site-packages/ndg/httpsclient/ssl_peer_verification.py
>>
>> it says:
>> try:
>> from ndg.httpsclient.subj_alt_name import SubjectAltName
>> from pyasn1.codec.der import decoder as der_decoder
>> SUBJ_ALT_NAME_SUPPORT = True
>> except ImportError, e:
>> SUBJ_ALT_NAME_SUPPORT = False
>> SUBJ_ALT_NAME_SUPPORT_MSG = (
>> 'SubjectAltName support is disabled - check pyasn1 package'
>> 'installation to enable'
>> )
>> import warnings
>> warnings.warn(SUBJ_ALT_NAME_SUPPORT_MSG)
>>
>> which gives: File
>> "/usr/lib/python3.4/site-packages/ndg/httpsclient/ssl_peer_verification.py",
>> line 17 except ImportError, e:
>
> It is solved by making it:
>      except (ImportError) as e:
>
> The same for:
>      /usr/lib/python3.4/site-packages/ndg/httpsclient/subj_alt_name.py
>
> I would not mind to solve those and others if I could contribute them
> to the Python community. What is the procedure for that?
>

You'll have to find out who supports ndg as it's not standard Python. 
The big clue is the site-packages folder name, that's used for third 
party packages.  From searching I think it's this 
https://github.com/cedadev/ndg_httpsclient/ but please don't quote me on 
that.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list