Mercurial > piecrust2
diff piecrust/sources/posts.py @ 1127:4cc020ff2537
prepare: Fix crash when preparing new pages.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 28 Feb 2018 20:16:33 -0800 |
parents | 8adc27285d93 |
children | 1bb70ec2cb03 |
line wrap: on
line diff
--- a/piecrust/sources/posts.py Wed Feb 28 20:16:04 2018 -0800 +++ b/piecrust/sources/posts.py Wed Feb 28 20:16:33 2018 -0800 @@ -174,8 +174,10 @@ try: year, month, day = [int(s) for s in date.split('/')] except ValueError: - raise Exception("Dates must be of the form: " - "YEAR/MONTH/DAY.") + raise Exception( + "Dates must be of the form 'YEAR/MONTH/DAY', " + "got '%s'." % + str(date)) dt = datetime.date(year, month, day) elif isinstance(date, datetime.datetime): dt = datetime.date(date.year, date.month, date.day)