equal
deleted
inserted
replaced
940 type(None), |
940 type(None), |
941 unicode, |
941 unicode, |
942 users.User, |
942 users.User, |
943 ]) |
943 ]) |
944 |
944 |
945 _RAW_PROPERTY_TYPES = frozenset([ |
945 _RAW_PROPERTY_TYPES = (Blob, Text) |
946 Blob, |
|
947 Text, |
|
948 ]) |
|
949 |
|
950 _STRING_TYPES = frozenset([ |
|
951 str, |
|
952 unicode, |
|
953 ]) |
|
954 |
946 |
955 def ValidatePropertyInteger(name, value): |
947 def ValidatePropertyInteger(name, value): |
956 """Raises an exception if the supplied integer is invalid. |
948 """Raises an exception if the supplied integer is invalid. |
957 |
949 |
958 Args: |
950 Args: |
1141 """ |
1133 """ |
1142 pbvalue.set_int64value(DatetimeToTimestamp(value)) |
1134 pbvalue.set_int64value(DatetimeToTimestamp(value)) |
1143 |
1135 |
1144 |
1136 |
1145 def DatetimeToTimestamp(value): |
1137 def DatetimeToTimestamp(value): |
1146 """Converts a datetime.datetime to seconds since the epoch, as a float. |
1138 """Converts a datetime.datetime to microseconds since the epoch, as a float. |
1147 Args: |
1139 Args: |
1148 value: datetime.datetime |
1140 value: datetime.datetime |
1149 |
1141 |
1150 Returns: value as a long |
1142 Returns: value as a long |
1151 """ |
1143 """ |