Converted another datetime.utcnow() to utils.utcnow()
This commit is contained in:
parent
de801e41e3
commit
1f2fb774b4
@ -10,6 +10,7 @@ import gcloud.exceptions as gcloud_exc
|
|||||||
from flask import current_app, g
|
from flask import current_app, g
|
||||||
from werkzeug.local import LocalProxy
|
from werkzeug.local import LocalProxy
|
||||||
|
|
||||||
|
from pillar.api import utils
|
||||||
from .abstract import Bucket, Blob, FileType
|
from .abstract import Bucket, Blob, FileType
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -188,7 +189,7 @@ class GoogleCloudStorageBlob(Blob):
|
|||||||
if is_public:
|
if is_public:
|
||||||
return self.gblob.public_url
|
return self.gblob.public_url
|
||||||
|
|
||||||
expiration = datetime.datetime.utcnow() + datetime.timedelta(days=1)
|
expiration = utils.utcnow() + datetime.timedelta(days=1)
|
||||||
return self.gblob.generate_signed_url(expiration)
|
return self.gblob.generate_signed_url(expiration)
|
||||||
|
|
||||||
def make_public(self):
|
def make_public(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user