projects
/
skytools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e97eef4
)
londiste.handlers.dispatch: Detailed exception if part_field is NULL
author
Marko Kreen
<markokr@gmail.com>
Wed, 18 Apr 2012 12:46:31 +0000
(15:46 +0300)
committer
Marko Kreen
<markokr@gmail.com>
Wed, 18 Apr 2012 12:46:31 +0000
(15:46 +0300)
Give enough details to locate the event in queue
python/londiste/handlers/dispatch.py
patch
|
blob
|
blame
|
history
diff --git
a/python/londiste/handlers/dispatch.py
b/python/londiste/handlers/dispatch.py
index 95d08e726e0c5f2cf10ed60b0d6fb5ec3fc8c5f9..6505736a204c449ef7d71a60fc8357375b072f43 100644
(file)
--- a/
python/londiste/handlers/dispatch.py
+++ b/
python/londiste/handlers/dispatch.py
@@
-838,6
+838,8
@@
class Dispatcher(BaseHandler):
dtm = datetime.datetime.now()
elif self.conf.part_mode == 'date_field':
dt_str = data[self.conf.part_field]
+ if dt_str is None:
+ raise Exception('part_field(%s) is NULL: %s' % (self.conf.part_field, ev))
dtm = datetime.datetime.strptime(dt_str[:19], "%Y-%m-%d %H:%M:%S")
else:
raise UsageError('Bad value for part_mode: %s' %\