Browse files


  • Loading branch information...
1 parent 1713c95 commit 3765f2dc61dfd0dd9d12839fee8cc58e56af6269 Eugene Efremov committed Apr 16, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 discoversong/
7 discoversong/
@@ -45,11 +45,16 @@ class BSONTranscoder(object):
def encode(data):
+ print 'encode', type(data)
if not isinstance(data, dict):
- raise ValueError('BSON can only encode dictionary objects. Try calling to_dict() on the data you are passing in.')
+ raise ValueError('BSON can only encode dictionary objects.')
+ print dumps(data)
return dumps(data)
def decode(string):
+ print 'decode', type(string)
+ if not isinstance(string, basestring):
+ raise ValueError('BSON can only decode strings.')
return loads(string)

0 comments on commit 3765f2d

Please sign in to comment.