commit | 1f3b4e12e8ba9cd896625ba02ea1ab6849ca3a07 | [log] [tgz] |
---|---|---|
author | Florent Xicluna <florent.xicluna@gmail.com> | Sun Mar 07 12:14:25 2010 +0000 |
committer | Florent Xicluna <florent.xicluna@gmail.com> | Sun Mar 07 12:14:25 2010 +0000 |
tree | 42dc10540da9b1aff1d4e6cef51e4c11ce4f5b47 | |
parent | 2a4ab816332a67150fcc8ece255fb1ee8e66af83 [diff] [blame] |
Fix some py3k warnings in the standard library.
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 @@ 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