summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2006-04-03 15:21:59 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2006-04-03 15:21:59 (GMT)
commit72d84af401727711170a605ae5c82596f514f84e (patch)
tree0230c3df6d9c2b6b213ff86e604d82ea08653917 /Lib
parentaba10cf153193032a494dbd0667a1b86a32d821b (diff)
downloadcpython-72d84af401727711170a605ae5c82596f514f84e.zip
cpython-72d84af401727711170a605ae5c82596f514f84e.tar.gz
cpython-72d84af401727711170a605ae5c82596f514f84e.tar.bz2
Always return firstweekday % 7 instead of complaining
on setting.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/calendar.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/calendar.py b/Lib/calendar.py
index 2b974bf..4965773 100644
--- a/Lib/calendar.py
+++ b/Lib/calendar.py
@@ -131,11 +131,9 @@ class Calendar(object):
self.firstweekday = firstweekday # 0 = Monday, 6 = Sunday
def getfirstweekday(self):
- return self._firstweekday
+ return self._firstweekday % 7
def setfirstweekday(self, firstweekday):
- if not MONDAY <= firstweekday <= SUNDAY:
- raise IllegalWeekdayError(firstweekday)
self._firstweekday = firstweekday
firstweekday = property(getfirstweekday, setfirstweekday)