Beispiel #1
0
 def deserialize(cls, serialized, serializer=None):
     serialized = convert_to_string(serialized)
     serializer = serializer or BinarySerializer()
     if serialized:
         return serializer.deserialize(serialized)
     else:
         raise MacaroonInitException(
             'Must supply serialized macaroon.'
         )
Beispiel #2
0
 def serialize(self, serializer=None):
     serializer = serializer or BinarySerializer()
     return serializer.serialize(self)