Ran 2to3 on pillar/api/utils/storage.py
This commit is contained in:
parent
0eb2f17624
commit
1f3d699a0c
@ -27,7 +27,7 @@ def register_backend(backend_name):
|
||||
return wrapper
|
||||
|
||||
|
||||
class Bucket(object):
|
||||
class Bucket(object, metaclass=abc.ABCMeta):
|
||||
"""Can be a GCS bucket or simply a project folder in Pillar
|
||||
|
||||
:type name: string
|
||||
@ -36,8 +36,6 @@ class Bucket(object):
|
||||
|
||||
"""
|
||||
|
||||
__metaclass__ = abc.ABCMeta
|
||||
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
|
||||
@ -59,7 +57,7 @@ class Bucket(object):
|
||||
pass
|
||||
|
||||
|
||||
class Blob(object):
|
||||
class Blob(object, metaclass=abc.ABCMeta):
|
||||
"""A wrapper for file or blob objects.
|
||||
|
||||
:type name: string
|
||||
@ -67,8 +65,6 @@ class Blob(object):
|
||||
|
||||
"""
|
||||
|
||||
__metaclass__ = abc.ABCMeta
|
||||
|
||||
def __init__(self, name, bucket):
|
||||
self.name = name
|
||||
self.bucket = bucket
|
||||
@ -130,7 +126,7 @@ class Blob(object):
|
||||
mime_category, src_file['format'] = src_file['content_type'].split('/',
|
||||
1)
|
||||
# Prevent video handling for non-admins.
|
||||
if not user_has_role(u'admin') and mime_category == 'video':
|
||||
if not user_has_role('admin') and mime_category == 'video':
|
||||
if src_file['format'].startswith('x-'):
|
||||
xified = src_file['format']
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user