Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9125059
read_write_filter.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
752 B
Subscribers
None
read_write_filter.py
View Options
# Copyright (C) 2015-2016 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from
.filter
import
ObjStorageFilter
class
ReadObjStorageFilter
(
ObjStorageFilter
):
""" Filter that disable write operation of the storage.
Writes will always succeed without doing any actual write operations.
"""
def
check_config
(
self
,
*
,
check_write
):
return
self
.
storage
.
check_config
(
check_write
=
False
)
def
add
(
self
,
*
args
,
**
kwargs
):
return
def
restore
(
self
,
*
args
,
**
kwargs
):
return
def
delete
(
self
,
*
args
,
**
kwargs
):
return
True
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Sat, Jun 21, 7:59 PM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3241632
Attached To
rDOBJS Object storage
Event Timeline
Log In to Comment