summaryrefslogtreecommitdiff
path: root/babel/dates.py
diff options
context:
space:
mode:
authorArmin Ronacher <armin.ronacher@active-4.com>2008-07-14 22:18:39 +0000
committerArmin Ronacher <armin.ronacher@active-4.com>2008-07-14 22:18:39 +0000
commit7ca4415400c142d0b45bee7f3c53641d4742fc9c (patch)
tree9a7a48460dd560ac1f6af8d8377e1bb089fa98e5 /babel/dates.py
parent70d14e5b3973bcdb6278f267fdb60412030b9a01 (diff)
downloadbabel-7ca4415400c142d0b45bee7f3c53641d4742fc9c.tar.gz
Fixed a bug in plural.py that caused a traceback for some locales, changed the `__mod__` DateTimePattern to not raise exceptions but return NotImplemented.
Diffstat (limited to 'babel/dates.py')
-rw-r--r--babel/dates.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/babel/dates.py b/babel/dates.py
index 2802004..5e2723a 100644
--- a/babel/dates.py
+++ b/babel/dates.py
@@ -731,7 +731,8 @@ class DateTimePattern(object):
return self.pattern
def __mod__(self, other):
- assert type(other) is DateTimeFormat
+ if type(other) is not DateTimeFormat:
+ return NotImplemented
return self.format % other
def apply(self, datetime, locale):