summaryrefslogtreecommitdiffstats
path: root/Lib/calendar.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-03-07 12:14:25 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-03-07 12:14:25 (GMT)
commit1f3b4e12e8ba9cd896625ba02ea1ab6849ca3a07 (patch)
tree42dc10540da9b1aff1d4e6cef51e4c11ce4f5b47 /Lib/calendar.py
parent2a4ab816332a67150fcc8ece255fb1ee8e66af83 (diff)
downloadcpython-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.py4
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