diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-07 12:14:25 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-07 12:14:25 (GMT) |
commit | 1f3b4e12e8ba9cd896625ba02ea1ab6849ca3a07 (patch) | |
tree | 42dc10540da9b1aff1d4e6cef51e4c11ce4f5b47 /Lib/calendar.py | |
parent | 2a4ab816332a67150fcc8ece255fb1ee8e66af83 (diff) | |
download | cpython-1f3b4e12e8ba9cd896625ba02ea1ab6849ca3a07.zip cpython-1f3b4e12e8ba9cd896625ba02ea1ab6849ca3a07.tar.gz cpython-1f3b4e12e8ba9cd896625ba02ea1ab6849ca3a07.tar.bz2 |
Fix some py3k warnings in the standard library.
Diffstat (limited to 'Lib/calendar.py')
-rw-r--r-- | Lib/calendar.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/calendar.py b/Lib/calendar.py index ab14c7d..2e45e24 100644 --- a/Lib/calendar.py +++ b/Lib/calendar.py @@ -564,6 +564,10 @@ c = TextCalendar() firstweekday = c.getfirstweekday def setfirstweekday(firstweekday): + try: + firstweekday.__index__ + except AttributeError: + raise IllegalWeekdayError(firstweekday) if not MONDAY <= firstweekday <= SUNDAY: raise IllegalWeekdayError(firstweekday) c.firstweekday = firstweekday |