Exemple #1
0
 def serialize(duration, protocol_version):
     try:
         m, d, n = duration.months, duration.days, duration.nanoseconds
     except AttributeError:
         raise TypeError('DurationType arguments must be a Duration.')
     return vints_pack([m, d, n])
Exemple #2
0
 def serialize(duration, protocol_version):
     try:
         m, d, n = duration.months, duration.days, duration.nanoseconds
     except AttributeError:
         raise TypeError('DurationType arguments must be a Duration.')
     return vints_pack([m, d, n])