New submission from WoLpH <[EMAIL PROTECTED]>:

Steps to reproduce:
>>> import calendar
>>> calendar.LocaleHTMLCalendar()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/calendar.py", line 540, in __init__
    locale = locale.getdefaultlocale()
AttributeError: 'NoneType' object has no attribute 'getdefaultlocale'

The same goes for LocaleTextCalendar, the problem is caused by this 
code which obviously would never work:
if locale is None:
    locale = locale.getdefaultlocale()

The fix should be quite easy, rename the local variable and it will 
work again :)

----------
components: Extension Modules
messages: 69952
nosy: WoLpH
severity: normal
status: open
title: LocaleTextCalendar and LocaleHTMLCalendar break without a locale
type: crash
versions: Python 2.5

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3406>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to