Skip to content

Commit c483c60

Browse files
committed
Merge pull request #62 from jgeewax/master
Fixed #61 - Missing timedelta import.
2 parents b36e426 + 755a94d commit c483c60

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

gcloud/datastore/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Helper methods for dealing with Cloud Datastore's Protobuf API."""
22
import calendar
3-
from datetime import datetime
3+
from datetime import datetime, timedelta
44

55
import pytz
66

@@ -79,7 +79,7 @@ def get_value_from_protobuf(pb):
7979
if pb.value.HasField('timestamp_microseconds_value'):
8080
microseconds = pb.value.timestamp_microseconds_value
8181
return (datetime.utcfromtimestamp(0) +
82-
datetime.timedelta(microseconds=microseconds))
82+
timedelta(microseconds=microseconds))
8383

8484
elif pb.value.HasField('key_value'):
8585
return Key.from_protobuf(pb.value.key_value)

0 commit comments

Comments
 (0)