[Python-Dev] Problem with 'import site' on Linux
Fredrik Lundh" <email@example.com
Mon, 10 Jul 2000 01:11:38 +0200
> The function _locale._getdefaultlocale seems to only be defined if
> python is compiled for windows, but an attempt is made to call it
> regardless of the OS in locale.getdefaultlocale. This is causing
> 'import site' to fail when I start python. I am not sure what ought =
> be called instead; in my version, for now, I am going to amend the =
> except: block that this code is wrapped in so that it catches
> AttributeError's, as well.
> The code I'm referring to is around line 262 in Lib/locale.py, and =
> 343 in Modules/_localemodule.c
I'll fix this in the repository. the except clause should catch
AttributeError, not NameError.