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
|
- 0.2.6
|
||||||
* Ensure atomic state lock in fs
|
* Ensure atomic state lock in fs
|
||||||
- 0.2.5
|
- 0.2.5
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = shep
|
name = shep
|
||||||
version = 0.2.6
|
version = 0.2.7
|
||||||
description = Multi-state key stores using bit masks
|
description = Multi-state key stores using bit masks
|
||||||
author = Louis Holbrook
|
author = Louis Holbrook
|
||||||
author_email = dev@holbrook.no
|
author_email = dev@holbrook.no
|
||||||
|
@ -115,7 +115,11 @@ class SimpleFileStore:
|
|||||||
files = []
|
files = []
|
||||||
for p in os.listdir(self.__path):
|
for p in os.listdir(self.__path):
|
||||||
fp = os.path.join(self.__path, p)
|
fp = os.path.join(self.__path, p)
|
||||||
|
f = None
|
||||||
|
try:
|
||||||
f = open(fp, self.__m[0])
|
f = open(fp, self.__m[0])
|
||||||
|
except FileNotFoundError:
|
||||||
|
continue
|
||||||
r = f.read()
|
r = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
if len(r) == 0:
|
if len(r) == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user