Revision f3b65e8f snf-pithos-backend/pithos/backends/lib/hashfiler/store.py
b/snf-pithos-backend/pithos/backends/lib/hashfiler/store.py | ||
---|---|---|
38 | 38 |
|
39 | 39 |
class Store(object): |
40 | 40 |
"""Store. |
41 |
Required constructor parameters: path, block_size, hash_algorithm. |
|
41 |
Required constructor parameters: path, block_size, hash_algorithm, umask.
|
|
42 | 42 |
""" |
43 | 43 |
|
44 | 44 |
def __init__(self, **params): |
45 |
umask = params['umask'] |
|
46 |
if umask is not None: |
|
47 |
os.umask(umask) |
|
48 |
|
|
45 | 49 |
path = params['path'] |
46 | 50 |
if path and not os.path.exists(path): |
47 | 51 |
os.makedirs(path) |
Also available in: Unified diff