Commits

Jason R. Coombs committed 37d078c

Fix a couple of bugs in registration

Comments (0)

Files changed (2)

jaraco/modb/datetime.py

+from __future__ import absolute_import
+
 import datetime
 
 import jsonpickle.handlers

jaraco/modb/handlers.py

 import jsonpickle.handlers
 
 def register(class_):
-    for handled_type in class_._handles:
+    for handled_type in getattr(class_, '_handles', []):
         jsonpickle.handlers.registry.register(handled_type, class_)
+    return class_
 
 @register
 class SimpleReduceHandler(jsonpickle.handlers.BaseHandler):