Handle missing files in filesystem store list
This commit is contained in:
parent
1951fcda8a
commit
ee6820ef60
@ -1,3 +1,5 @@
|
||||
- 0.2.7
|
||||
* Handle missing files in fs readdir list
|
||||
- 0.2.6
|
||||
* Ensure atomic state lock in fs
|
||||
- 0.2.5
|
||||
|
@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = shep
|
||||
version = 0.2.6
|
||||
version = 0.2.7
|
||||
description = Multi-state key stores using bit masks
|
||||
author = Louis Holbrook
|
||||
author_email = dev@holbrook.no
|
||||
|
@ -115,7 +115,11 @@ class SimpleFileStore:
|
||||
files = []
|
||||
for p in os.listdir(self.__path):
|
||||
fp = os.path.join(self.__path, p)
|
||||
f = open(fp, self.__m[0])
|
||||
f = None
|
||||
try:
|
||||
f = open(fp, self.__m[0])
|
||||
except FileNotFoundError:
|
||||
continue
|
||||
r = f.read()
|
||||
f.close()
|
||||
if len(r) == 0:
|
||||
|
Loading…
Reference in New Issue
Block a user