Saurabh Gupta added the comment:
Thank you all for your inputs!
Now I understand what the issue really is & would be fixing it by removing the
imports in the legacy software.
I agree with the won't fix resolution of the ticket.
--
_
Saurabh Gupta added the comment:
I have a legacy software that has things like:
try:
some stuff
except OSError, why:
if WindowsError is not None and isinstance(why, WindowsError):
do something
else:
do something else
So I'd ideally
Saurabh Gupta added the comment:
And, the same thing on linux:
>>> import shutil
>>> print shutil.__file__
/software/package/linux64_centos6/python/2.6.7/lib/python2.6/shutil.pyc
>>> print dir(shutil)
['Error', 'WindowsError', '__all__
Saurabh Gupta added the comment:
>>> import shutil
>>> shutil.__file__
'C:\\Python26\\lib\\shutil.pyc'
>>> dir(shutil)
['Error', '__all__', '__builtins__', '__doc__', '__file__', '__name__'
New submission from Saurabh Gupta:
I've observed that shutil fails to import WindowsError on our windows 7 systems:
from shutil import WindowsError
File , line , in
from shutil import WindowsError
ImportError: cannot import name WindowsError
The same statement